Autore Topic: Capire l'errore dal LogCat  (Letto 971 volte)

Offline Gazzerpiece

  • Nuovo arrivato
  • *
  • Post: 13
  • Respect: 0
    • Mostra profilo
  • Dispositivo Android:
    emulatore
  • Sistema operativo:
    Windows 7
Capire l'errore dal LogCat
« il: 23 Settembre 2013, 13:01:02 CEST »
0
Scusate ma non riesco a capire l'errore che non mi fa partire l'applicazione sull'emulatore (Android 4.33 , API 18).
Sul codice non mi viene segnato alcun errore ma al momento dell'avvio l'emulatore mi da il messaggio Unfortunately, Progetto has stopped.

IL LogCat è questo:
Codice: [Seleziona]
09-23 06:48:25.203: D/AndroidRuntime(873): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
09-23 06:48:25.203: D/AndroidRuntime(873): CheckJNI is ON
09-23 06:48:25.303: D/dalvikvm(873): Trying to load lib libjavacore.so 0x0
09-23 06:48:25.333: D/dalvikvm(873): Added shared lib libjavacore.so 0x0
09-23 06:48:25.433: D/dalvikvm(873): Trying to load lib libnativehelper.so 0x0
09-23 06:48:25.444: D/dalvikvm(873): Added shared lib libnativehelper.so 0x0
09-23 06:48:25.683: E/cutils-trace(873): Error opening trace file: No such file or directory (2)
09-23 06:48:26.983: D/AndroidRuntime(873): Calling main entry com.android.commands.pm.Pm
09-23 06:48:27.033: D/AndroidRuntime(873): Shutting down VM
09-23 06:48:27.044: D/dalvikvm(873): Debugger has detached; object registry had 1 entries
09-23 06:48:28.523: D/AndroidRuntime(884): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
09-23 06:48:28.523: D/AndroidRuntime(884): CheckJNI is ON
09-23 06:48:28.617: D/dalvikvm(884): Trying to load lib libjavacore.so 0x0
09-23 06:48:28.643: D/dalvikvm(884): Added shared lib libjavacore.so 0x0
09-23 06:48:28.753: D/dalvikvm(884): Trying to load lib libnativehelper.so 0x0
09-23 06:48:28.753: D/dalvikvm(884): Added shared lib libnativehelper.so 0x0
09-23 06:48:28.933: E/cutils-trace(884): Error opening trace file: No such file or directory (2)
09-23 06:48:30.333: D/AndroidRuntime(884): Calling main entry com.android.commands.am.Am
09-23 06:48:30.353: D/dalvikvm(884): Note: class Landroid/app/ActivityManagerNative; has 163 unimplemented (abstract) methods
09-23 06:48:30.413: I/ActivityManager(290): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.example.progetto_prova/.MainActivity} from pid 884
09-23 06:48:30.473: W/WindowManager(290): Screenshot failure taking screenshot for (328x583) to layer 21005
09-23 06:48:30.553: W/dalvikvm(895): PR_CAPBSET_DROP 0 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
09-23 06:48:30.563: D/AndroidRuntime(884): Shutting down VM
09-23 06:48:30.584: D/dalvikvm(884): Debugger has detached; object registry had 1 entries
09-23 06:48:30.603: W/dalvikvm(895): PR_CAPBSET_DROP 1 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
09-23 06:48:30.603: W/dalvikvm(895): PR_CAPBSET_DROP 2 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
09-23 06:48:30.603: W/dalvikvm(895): PR_CAPBSET_DROP 3 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
09-23 06:48:30.603: W/dalvikvm(895): PR_CAPBSET_DROP 4 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
09-23 06:48:30.613: W/dalvikvm(895): PR_CAPBSET_DROP 5 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
09-23 06:48:30.613: W/dalvikvm(895): PR_CAPBSET_DROP 6 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
09-23 06:48:30.613: W/dalvikvm(895): PR_CAPBSET_DROP 7 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
09-23 06:48:30.613: W/dalvikvm(895): PR_CAPBSET_DROP 8 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
09-23 06:48:30.613: W/dalvikvm(895): PR_CAPBSET_DROP 9 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
09-23 06:48:30.613: W/dalvikvm(895): PR_CAPBSET_DROP 10 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
09-23 06:48:30.613: W/dalvikvm(895): PR_CAPBSET_DROP 11 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
09-23 06:48:30.613: W/dalvikvm(895): PR_CAPBSET_DROP 12 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
09-23 06:48:30.613: W/dalvikvm(895): PR_CAPBSET_DROP 13 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
09-23 06:48:30.613: W/dalvikvm(895): PR_CAPBSET_DROP 14 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
09-23 06:48:30.623: W/dalvikvm(895): PR_CAPBSET_DROP 15 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
09-23 06:48:30.623: W/dalvikvm(895): PR_CAPBSET_DROP 16 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
09-23 06:48:30.623: W/dalvikvm(895): PR_CAPBSET_DROP 17 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
09-23 06:48:30.623: W/dalvikvm(895): PR_CAPBSET_DROP 18 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
09-23 06:48:30.633: W/dalvikvm(895): PR_CAPBSET_DROP 19 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
09-23 06:48:30.633: W/dalvikvm(895): PR_CAPBSET_DROP 20 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
09-23 06:48:30.633: W/dalvikvm(895): PR_CAPBSET_DROP 21 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
09-23 06:48:30.633: W/dalvikvm(895): PR_CAPBSET_DROP 22 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
09-23 06:48:30.633: W/dalvikvm(895): PR_CAPBSET_DROP 23 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
09-23 06:48:30.633: W/dalvikvm(895): PR_CAPBSET_DROP 24 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
09-23 06:48:30.633: W/dalvikvm(895): PR_CAPBSET_DROP 25 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
09-23 06:48:30.633: W/dalvikvm(895): PR_CAPBSET_DROP 26 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
09-23 06:48:30.633: W/dalvikvm(895): PR_CAPBSET_DROP 27 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
09-23 06:48:30.633: W/dalvikvm(895): PR_CAPBSET_DROP 28 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
09-23 06:48:30.633: W/dalvikvm(895): PR_CAPBSET_DROP 29 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
09-23 06:48:30.633: W/dalvikvm(895): PR_CAPBSET_DROP 30 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
09-23 06:48:30.633: W/dalvikvm(895): PR_CAPBSET_DROP 31 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
09-23 06:48:30.633: W/dalvikvm(895): PR_CAPBSET_DROP 32 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
09-23 06:48:30.633: W/dalvikvm(895): PR_CAPBSET_DROP 33 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
09-23 06:48:30.663: I/ActivityManager(290): Start proc com.example.progetto_prova for activity com.example.progetto_prova/.MainActivity: pid=895 uid=10049 gids={50049, 1028}
09-23 06:48:30.673: D/dalvikvm(895): Not late-enabling CheckJNI (already on)
09-23 06:48:32.795: D/AndroidRuntime(895): Shutting down VM
09-23 06:48:32.795: W/dalvikvm(895): threadid=1: thread exiting with uncaught exception (group=0x41465700)
09-23 06:48:32.916: E/AndroidRuntime(895): FATAL EXCEPTION: main
09-23 06:48:32.916: E/AndroidRuntime(895): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.progetto_prova/com.example.progetto_prova.MainActivity}: java.lang.NullPointerException
09-23 06:48:32.916: E/AndroidRuntime(895):         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2137)
09-23 06:48:32.916: E/AndroidRuntime(895):         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
09-23 06:48:32.916: E/AndroidRuntime(895):         at android.app.ActivityThread.access$600(ActivityThread.java:141)
09-23 06:48:32.916: E/AndroidRuntime(895):         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
09-23 06:48:32.916: E/AndroidRuntime(895):         at android.os.Handler.dispatchMessage(Handler.java:99)
09-23 06:48:32.916: E/AndroidRuntime(895):         at android.os.Looper.loop(Looper.java:137)
09-23 06:48:32.916: E/AndroidRuntime(895):         at android.app.ActivityThread.main(ActivityThread.java:5103)
09-23 06:48:32.916: E/AndroidRuntime(895):         at java.lang.reflect.Method.invokeNative(Native Method)
09-23 06:48:32.916: E/AndroidRuntime(895):         at java.lang.reflect.Method.invoke(Method.java:525)
09-23 06:48:32.916: E/AndroidRuntime(895):         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
09-23 06:48:32.916: E/AndroidRuntime(895):         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
09-23 06:48:32.916: E/AndroidRuntime(895):         at dalvik.system.NativeStart.main(Native Method)
09-23 06:48:32.916: E/AndroidRuntime(895): Caused by: java.lang.NullPointerException
09-23 06:48:32.916: E/AndroidRuntime(895):         at android.app.Activity.findViewById(Activity.java:1853)
09-23 06:48:32.916: E/AndroidRuntime(895):         at com.example.progetto_prova.MainActivity.<init>(MainActivity.java:27)
09-23 06:48:32.916: E/AndroidRuntime(895):         at java.lang.Class.newInstanceImpl(Native Method)
09-23 06:48:32.916: E/AndroidRuntime(895):         at java.lang.Class.newInstance(Class.java:1130)
09-23 06:48:32.916: E/AndroidRuntime(895):         at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
09-23 06:48:32.916: E/AndroidRuntime(895):         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2128)
09-23 06:48:32.916: E/AndroidRuntime(895):         ... 11 more
09-23 06:48:33.637: W/ActivityManager(290):   Force finishing activity com.example.progetto_prova/.MainActivity
09-23 06:48:34.263: W/WindowManager(290): Screenshot failure taking screenshot for (328x583) to layer 22010
09-23 06:48:34.933: W/ActivityManager(290): Activity pause timeout for ActivityRecord{41957820 u0 com.example.progetto_prova/.MainActivity}
09-23 06:48:35.133: I/Choreographer(290): Skipped 30 frames!  The application may be doing too much work on its main thread.
09-23 06:48:35.733: I/Choreographer(290): Skipped 54 frames!  The application may be doing too much work on its main thread.
09-23 06:48:39.343: I/Process(895): Sending signal. PID: 895 SIG: 9
09-23 06:48:39.383: I/ActivityManager(290): Process com.example.progetto_prova (pid 895) has died.
09-23 06:48:39.443: E/SoundPool(290): error loading /system/media/audio/ui/Effect_Tick.ogg
09-23 06:48:39.443: W/AudioService(290): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
09-23 06:48:39.443: E/SoundPool(290): error loading /system/media/audio/ui/Effect_Tick.ogg
09-23 06:48:39.443: W/AudioService(290): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
09-23 06:48:39.453: E/SoundPool(290): error loading /system/media/audio/ui/Effect_Tick.ogg
09-23 06:48:39.453: W/AudioService(290): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
09-23 06:48:39.463: E/SoundPool(290): error loading /system/media/audio/ui/Effect_Tick.ogg
09-23 06:48:39.463: W/AudioService(290): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
09-23 06:48:39.473: E/SoundPool(290): error loading /system/media/audio/ui/Effect_Tick.ogg
09-23 06:48:39.473: W/AudioService(290): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
09-23 06:48:39.503: E/SoundPool(290): error loading /system/media/audio/ui/KeypressStandard.ogg
09-23 06:48:39.503: W/AudioService(290): Soundpool could not load file: /system/media/audio/ui/KeypressStandard.ogg
09-23 06:48:39.543: E/SoundPool(290): error loading /system/media/audio/ui/KeypressSpacebar.ogg
09-23 06:48:39.543: W/AudioService(290): Soundpool could not load file: /system/media/audio/ui/KeypressSpacebar.ogg
09-23 06:48:39.543: E/SoundPool(290): error loading /system/media/audio/ui/KeypressDelete.ogg
09-23 06:48:39.603: W/AudioService(290): Soundpool could not load file: /system/media/audio/ui/KeypressDelete.ogg
09-23 06:48:39.603: E/SoundPool(290): error loading /system/media/audio/ui/KeypressReturn.ogg
09-23 06:48:39.603: W/AudioService(290): Soundpool could not load file: /system/media/audio/ui/KeypressReturn.ogg
09-23 06:48:39.603: W/AudioService(290): onLoadSoundEffects(), Error -1 while loading samples
09-23 06:48:40.493: W/ActivityManager(290): Launch timeout has expired, giving up wake lock!
09-23 06:48:41.383: W/InputMethodManagerService(290): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@41e7e098 attribute=null, token = android.os.BinderProxy@41b09d00

non trova la directory del progetto possibile?

Offline maku85

  • Nuovo arrivato
  • *
  • Post: 28
  • Respect: +35
    • Mostra profilo
  • Dispositivo Android:
    Sony Xperia J
  • Play Store ID:
    MaKu
  • Sistema operativo:
    Windows 8.1
Re:Capire l'errore dal LogCat
« Risposta #1 il: 23 Settembre 2013, 13:08:27 CEST »
+1
Il problema dovrebbe essere indicato in questo punto

Codice (Java): [Seleziona]
09-23 06:48:32.916: E/AndroidRuntime(895): Caused by: java.lang.NullPointerException
09-23 06:48:32.916: E/AndroidRuntime(895):         at android.app.Activity.findViewById(Activity.java:1853)
09-23 06:48:32.916: E/AndroidRuntime(895):         at com.example.progetto_prova.MainActivity.<init>(MainActivity.java:27)

riga 27 della classe MainActivity.java, NullPointerException
« Ultima modifica: 23 Settembre 2013, 13:10:37 CEST da maku85 »
- Il programmatore è colui che risolve in un modo incomprensibile un problema che non sapevi di avere -