2011-08-04 3 views
0

Je suis en train d'utiliser des contrôles composés, donc j'ai essayé cet exemple dans les domaines suivants linkProblème avec l'exemple de contrôle composé?

Mais je reçois un droit FORCECLOSE au début, et la logcat montre beaucoup d'erreurs que je ne comprends pas. J'apprécierais vraiment toute aide.

Voici les erreurs de LogCat

> > 08-04 13:21:43.415: ERROR/Zygote(33): setreuid() failed. errno: 2 
> 08-04 13:21:53.055: ERROR/Zygote(33): setreuid() failed. errno: 17 
> 08-04 13:21:55.925: ERROR/BatteryService(71): usbOnlinePath not found 
> 08-04 13:21:55.925: ERROR/BatteryService(71): batteryVoltagePath not 
> found 08-04 13:21:55.935: ERROR/BatteryService(71): 
> batteryTemperaturePath not found 08-04 13:21:55.985: 
> ERROR/SurfaceFlinger(71): Couldn't open /sys/power/wait_for_fb_sleep 
> or /sys/power/wait_for_fb_wake 08-04 13:22:35.035: ERROR/EventHub(71): 
> could not get driver version for /dev/input/mouse0, Not a typewriter 
> 08-04 13:22:35.045: ERROR/EventHub(71): could not get driver version 
> for /dev/input/mice, Not a typewriter 08-04 13:22:35.355: 
> ERROR/System(71): Failure starting core service 08-04 13:22:35.355: 
> ERROR/System(71): java.lang.SecurityException 08-04 13:22:35.355: 
> ERROR/System(71):  at android.os.BinderProxy.transact(Native 
> Method) 08-04 13:22:35.355: ERROR/System(71):  at 
> android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146) 
> 08-04 13:22:35.355: ERROR/System(71):  at 
> android.os.ServiceManager.addService(ServiceManager.java:72) 08-04 
> 13:22:35.355: ERROR/System(71):  at 
> com.android.server.ServerThread.run(SystemServer.java:184) 08-04 
> 13:22:36.675: ERROR/SoundPool(71): error loading 
> /system/media/audio/ui/Effect_Tick.ogg 08-04 13:22:36.695: 
> ERROR/SoundPool(71): error loading 
> /system/media/audio/ui/KeypressStandard.ogg 08-04 13:22:36.695: 
> ERROR/SoundPool(71): error loading 
> /system/media/audio/ui/KeypressSpacebar.ogg 08-04 13:22:36.705: 
> ERROR/SoundPool(71): error loading 
> /system/media/audio/ui/KeypressDelete.ogg 08-04 13:22:36.715: 
> ERROR/SoundPool(71): error loading 
> /system/media/audio/ui/KeypressReturn.ogg 08-04 13:22:42.376: 
> ERROR/ThrottleService(71): Error reading data file 08-04 13:22:42.386: 
> ERROR/ThrottleService(71): Could not open GPS configuration file 
> /etc/gps.conf 08-04 13:22:43.735: ERROR/logwrapper(159): executing 
> /system/bin/tc failed: No such file or directory 08-04 13:22:43.825: 
> ERROR/logwrapper(160): executing /system/bin/tc failed: No such file 
> or directory 08-04 13:22:43.875: ERROR/logwrapper(161): executing 
> /system/bin/tc failed: No such file or directory 08-04 13:22:53.155: 
> ERROR/logwrapper(177): executing /system/bin/tc failed: No such file 
> or directory 08-04 13:22:53.245: ERROR/logwrapper(178): executing 
> /system/bin/tc failed: No such file or directory 08-04 13:22:53.345: 
> ERROR/logwrapper(179): executing /system/bin/tc failed: No such file 
> or directory 08-04 18:53:25.564: ERROR/Zygote(33): setreuid() failed. 
> errno: 2 08-04 18:53:34.955: ERROR/Zygote(33): setreuid() failed. 
> errno: 17 08-04 18:53:38.025: ERROR/BatteryService(68): usbOnlinePath 
> not found 08-04 18:53:38.025: ERROR/BatteryService(68): 
> batteryVoltagePath not found 08-04 18:53:38.025: 
> ERROR/BatteryService(68): batteryTemperaturePath not found 08-04 
> 18:53:38.075: ERROR/SurfaceFlinger(68): Couldn't open 
> /sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake 08-04 
> 18:53:45.854: ERROR/EventHub(68): could not get driver version for 
> /dev/input/mouse0, Not a typewriter 08-04 18:53:45.854: 
> ERROR/EventHub(68): could not get driver version for /dev/input/mice, 
> Not a typewriter 08-04 18:53:46.155: ERROR/System(68): Failure 
> starting core service 08-04 18:53:46.155: ERROR/System(68): 
> java.lang.SecurityException 08-04 18:53:46.155: ERROR/System(68):  
> at android.os.BinderProxy.transact(Native Method) 08-04 18:53:46.155: 
> ERROR/System(68):  at 
> android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146) 
> 08-04 18:53:46.155: ERROR/System(68):  at 
> android.os.ServiceManager.addService(ServiceManager.java:72) 08-04 
> 18:53:46.155: ERROR/System(68):  at 
> com.android.server.ServerThread.run(SystemServer.java:184) 08-04 
> 18:53:47.294: ERROR/SoundPool(68): error loading 
> /system/media/audio/ui/Effect_Tick.ogg 08-04 18:53:47.315: 
> ERROR/SoundPool(68): error loading 
> /system/media/audio/ui/KeypressStandard.ogg 08-04 18:53:47.315: 
> ERROR/SoundPool(68): error loading 
> /system/media/audio/ui/KeypressSpacebar.ogg 08-04 18:53:47.324: 
> ERROR/SoundPool(68): error loading 
> /system/media/audio/ui/KeypressDelete.ogg 08-04 18:53:47.334: 
> ERROR/SoundPool(68): error loading 
> /system/media/audio/ui/KeypressReturn.ogg 08-04 18:53:49.335: 
> ERROR/ThrottleService(68): Could not open GPS configuration file 
> /etc/gps.conf 08-04 18:53:50.555: ERROR/logwrapper(141): executing 
> /system/bin/tc failed: No such file or directory 08-04 18:53:50.625: 
> ERROR/logwrapper(143): executing /system/bin/tc failed: No such file 
> or directory 08-04 18:53:50.745: ERROR/logwrapper(145): executing 
> /system/bin/tc failed: No such file or directory 08-04 18:54:08.623: 
> ERROR/HierarchicalStateMachine(68): TetherMaster - unhandledMessage: 
> msg.what=3 08-04 18:54:08.733: ERROR/HierarchicalStateMachine(68): 
> TetherMaster - unhandledMessage: msg.what=3 08-04 18:54:41.137: 
> ERROR/MetadataRetrieverClient(34): failed to extract an album art 
> 08-04 18:54:52.397: ERROR/AndroidRuntime(296): FATAL EXCEPTION: main 
> 08-04 18:54:52.397: ERROR/AndroidRuntime(296): 
> java.lang.RuntimeException: Unable to start activity 
> ComponentInfo{pete.android.study/pete.android.study.MainActivity}: 
> android.content.res.Resources$NotFoundException: Resource is not a 
> Drawable (color or path): TypedValue{t=0x12/d=0x0 a=2 r=0x7f050003} 
> 08-04 18:54:52.397: ERROR/AndroidRuntime(296):  at 
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663) 
> 08-04 18:54:52.397: ERROR/AndroidRuntime(296):  at 
> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) 
> 08-04 18:54:52.397: ERROR/AndroidRuntime(296):  at 
> android.app.ActivityThread.access$2300(ActivityThread.java:125) 08-04 
> 18:54:52.397: ERROR/AndroidRuntime(296):  at 
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) 
> 08-04 18:54:52.397: ERROR/AndroidRuntime(296):  at 
> android.os.Handler.dispatchMessage(Handler.java:99) 08-04 
> 18:54:52.397: ERROR/AndroidRuntime(296):  at 
> android.os.Looper.loop(Looper.java:123) 08-04 18:54:52.397: 
> ERROR/AndroidRuntime(296):  at 
> android.app.ActivityThread.main(ActivityThread.java:4627) 08-04 
> 18:54:52.397: ERROR/AndroidRuntime(296):  at 
> java.lang.reflect.Method.invokeNative(Native Method) 08-04 
> 18:54:52.397: ERROR/AndroidRuntime(296):  at 
> java.lang.reflect.Method.invoke(Method.java:521) 08-04 18:54:52.397: 
> ERROR/AndroidRuntime(296):  at 
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 
> 08-04 18:54:52.397: ERROR/AndroidRuntime(296):  at 
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 08-04 
> 18:54:52.397: ERROR/AndroidRuntime(296):  at 
> dalvik.system.NativeStart.main(Native Method) 08-04 18:54:52.397: 
> ERROR/AndroidRuntime(296): Caused by: 
> android.content.res.Resources$NotFoundException: Resource is not a 
> Drawable (color or path): TypedValue{t=0x12/d=0x0 a=2 r=0x7f050003} 
> 08-04 18:54:52.397: ERROR/AndroidRuntime(296):  at 
> android.content.res.Resources.loadDrawable(Resources.java:1681) 08-04 
> 18:54:52.397: ERROR/AndroidRuntime(296):  at 
> android.content.res.Resources.getDrawable(Resources.java:581) 08-04 
> 18:54:52.397: ERROR/AndroidRuntime(296):  at 
> pete.android.study.MainActivity.onCreate(MainActivity.java:20) 08-04 
> 18:54:52.397: ERROR/AndroidRuntime(296):  at 
> android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 
> 08-04 18:54:52.397: ERROR/AndroidRuntime(296):  at 
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) 
> 08-04 18:54:52.397: ERROR/AndroidRuntime(296):  ... 11 more 08-04 
> 18:55:17.787: ERROR/ThrottleService(68): Error reading data file 

Répondre

0

Je pense que les lignes dont vous avez besoin de regarder sont celui-ci:

java.lang.RuntimeException: Impossible de démarrer l'activité ComposantInfo {pete. android.study/pete.android.study.MainActivity}: android.content.res.Resources $ NotFoundException: la ressource n'est pas un Dessins (couleur ou chemin): TypedValue {t = 0x12/d = 0x0 a = 2 r = 0x7f050003}

et celui-ci:

pete.android.study.MainActivity.onCreate (MainActivity.java:20)

regard à la ligne 20 de votre MainActivity. Vous essayez de définir quelque chose à un drawable qui n'est pas compatible.

+0

Ok, j'ai trouvé les erreurs. Les ressources que j'ai pointées étaient fausses. Une fois j'ai changé – Deepak

Questions connexes