-
Spiacenti! Interruzione imprevista dell'applicazione activity_name(package) Riprova
sono uno studente di ICD a bari e sto imparando a sviluppare con android, per la teoria sto utilizzando il buon libro dell'apogeo e, arrivati al capitolo 04, quello per la gestione di più attività con le intent mi propone un esempio ma nell'emulatore mi compare una schermata con scritto: "Spiacenti! Interruzione imprevista dell'applicazione LyfecicleActivitytest (processoit.apogeo.cap04.LifeCycleActivityTest).Ri prova" con un tasto che mi consente di terminare forzatamente l'applcazione, volevo sapere di che genere di problema si tratta e come si potrebbe risolvere, comunque se volete posto anche il codice completo del progetto così potete capire se sono io a sbagliare o può essere un problema di qualche altro genere, vi ringrazio anticipatamente per l'aiuto.
Ultima modifica di sgaglio88; 21-06-11 alle 12:20
-
-
-
ragazzi perchè non mi rispondete??penso che questo non sia solo un problema mio ma di molti che stanno cominciando a programmare in android!! non riesco ancora a risolverlo...HELP ME PLEASE!!!:S
-
-
Androidiano
metti un pò di codice e l'output di logcat
-
-
Allora questa è l'attività principale che si chiama LifeCycleActivityTestActivity:
Questa è l'attività secondaria(SecondActivity):
Questo è il manifest:
-
-
Androidiano
logcat cosa dice così facciamo prima?
-
-
L'HO POSTATO MA NON ME LO FANNO VISUALIZZARE FINCHE' UN MODERATORE NON MI DARA' IL CONSENSO CMQ QUESTI SONO GLI ERRORI DEL LOGCAT CHE MI SI PRESENTANO:
06-21 10:53:50.154: ERROR/vold(538): Error opening switch name path '/sys/class/switch/test2' (No such file or directory)
06-21 10:53:50.154: ERROR/vold(538): Error bootstrapping switch '/sys/class/switch/test2' (m)
06-21 10:53:50.154: ERROR/vold(538): Error opening switch name path '/sys/class/switch/test' (No such file or directory)
06-21 10:53:50.154: ERROR/vold(538): Error bootstrapping switch '/sys/class/switch/test' (m)
06-21 10:53:50.284: ERROR/flash_image(544): can't find recovery partition
06-21 10:54:00.475: ERROR/MemoryHeapBase(563): error opening /dev/pmem: No such file or directory
06-21 10:54:00.475: ERROR/SurfaceFlinger(563): Couldn't open /sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake
06-21 10:54:00.574: ERROR/GLLogger(563): couldn't load <libhgl.so> library (Cannot find library)
06-21 10:54:00.684: ERROR/GLLogger(563): couldn't load <libhgl.so> library (Cannot find library)
06-21 10:54:04.554: ERROR/BatteryService(563): Could not open '/sys/class/power_supply/usb/online'
06-21 10:54:04.554: ERROR/BatteryService(563): Could not open '/sys/class/power_supply/battery/batt_vol'
06-21 10:54:04.554: ERROR/BatteryService(563): Could not open '/sys/class/power_supply/battery/batt_temp'
06-21 10:54:05.173: ERROR/EventHub(563): could not get driver version for /dev/input/mouse0, Not a typewriter
06-21 10:54:05.203: ERROR/System(563): Failure starting core service
06-21 10:54:05.203: ERROR/System(563): java.lang.SecurityException
06-21 10:54:05.203: ERROR/System(563): at android.os.BinderProxy.transact(Native Method)
06-21 10:54:05.203: ERROR/System(563): at android.os.ServiceManagerProxy.addService(ServiceM anagerNative.java:146)
06-21 10:54:05.203: ERROR/System(563): at android.os.ServiceManager.addService(ServiceManage r.java:72)
06-21 10:54:05.203: ERROR/System(563): at com.android.server.ServerThread.run(SystemServer.j ava:163)
06-21 10:54:05.213: ERROR/EventHub(563): could not get driver version for /dev/input/mice, Not a typewriter
06-21 10:54:05.213: ERROR/AndroidRuntime(563): Crash logging skipped, no checkin service
06-21 10:54:06.333: ERROR/LockPatternKeyguardView(563): Failed to bind to GLS while checking for account
06-21 10:54:09.484: ERROR/ApplicationContext(563): Couldn't create directory for SharedPreferences file shared_prefs/wallpaper-hints.xml
06-21 10:54:16.215: ERROR/MediaPlayerService(542): Couldn't open fd for content://settings/system/notification_sound
06-21 10:54:16.235: ERROR/MediaPlayer(563): Unable to to create media player
06-21 10:54:10.123: ERROR/ActivityThread(612): Failed to find provider info for android.server.checkin
06-21 10:54:11.443: ERROR/ActivityThread(612): Failed to find provider info for android.server.checkin
06-21 10:54:11.653: ERROR/ActivityThread(612): Failed to find provider info for android.server.checkin
06-21 10:54:15.202: ERROR/AndroidRuntime(716): Uncaught handler: thread main exiting due to uncaught exception
06-21 10:54:15.222: ERROR/AndroidRuntime(716): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{it.apogeo.android.cap04.LifeCycleAct ivityTest/it.apogeo.android.cap04.LifeCycleActivityTest.Life CyleActivityTestActivity}: java.lang.ClassNotFoundException: it.apogeo.android.cap04.LifeCycleActivityTest.Life CyleActivityTestActivity in loader dalvik.system.PathClassLoader@43598b58
06-21 10:54:15.222: ERROR/AndroidRuntime(716): at android.app.ActivityThread.performLaunchActivity(A ctivityThread.java:2194)
06-21 10:54:15.222: ERROR/AndroidRuntime(716): at android.app.ActivityThread.handleLaunchActivity(Ac tivityThread.java:2284)
06-21 10:54:15.222: ERROR/AndroidRuntime(716): at android.app.ActivityThread.access$1800(ActivityThr ead.java:112)
06-21 10:54:15.222: ERROR/AndroidRuntime(716): at android.app.ActivityThread$H.handleMessage(Activit yThread.java:1692)
06-21 10:54:15.222: ERROR/AndroidRuntime(716): at android.os.Handler.dispatchMessage(Handler.java:99 )
06-21 10:54:15.222: ERROR/AndroidRuntime(716): at android.os.Looper.loop(Looper.java:123)
06-21 10:54:15.222: ERROR/AndroidRuntime(716): at android.app.ActivityThread.main(ActivityThread.jav a:3948)
06-21 10:54:15.222: ERROR/AndroidRuntime(716): at java.lang.reflect.Method.invokeNative(Native Method)
06-21 10:54:15.222: ERROR/AndroidRuntime(716): at java.lang.reflect.Method.invoke(Method.java:521)
06-21 10:54:15.222: ERROR/AndroidRuntime(716): at com.android.internal.os.ZygoteInit$MethodAndArgsCa ller.run(ZygoteInit.java:782)
06-21 10:54:15.222: ERROR/AndroidRuntime(716): at com.android.internal.os.ZygoteInit.main(ZygoteInit .java:540)
06-21 10:54:15.222: ERROR/AndroidRuntime(716): at dalvik.system.NativeStart.main(Native Method)
06-21 10:54:15.222: ERROR/AndroidRuntime(716): Caused by: java.lang.ClassNotFoundException: it.apogeo.android.cap04.LifeCycleActivityTest.Life CyleActivityTestActivity in loader dalvik.system.PathClassLoader@43598b58
06-21 10:54:15.222: ERROR/AndroidRuntime(716): at dalvik.system.PathClassLoader.findClass(PathClassL oader.java:243)
06-21 10:54:15.222: ERROR/AndroidRuntime(716): at java.lang.ClassLoader.loadClass(ClassLoader.java:5 73)
06-21 10:54:15.222: ERROR/AndroidRuntime(716): at java.lang.ClassLoader.loadClass(ClassLoader.java:5 32)
06-21 10:54:15.222: ERROR/AndroidRuntime(716): at android.app.Instrumentation.newActivity(Instrument ation.java:1097)
06-21 10:54:15.222: ERROR/AndroidRuntime(716): at android.app.ActivityThread.performLaunchActivity(A ctivityThread.java:2186)
06-21 10:54:15.222: ERROR/AndroidRuntime(716): ... 11 more
GRAZIE PER L'AIUTO
-
-
Problema risolto!!! Nel manifest non dichiaravo bene tutte le attività con le relative label e non trovandole mi dava errore a run-time!!!
-
Permessi di invio
- Non puoi inserire discussioni
- Non puoi inserire risposte
- Non puoi inserire allegati
- Non puoi modificare i tuoi messaggi
-
Regole del Forum