Wednesday, April 10, 2013

[android help] thread exiting with uncaught exception - but app still runs as designed


When installing my app to the emulator from Eclipse, I sometimes get an error in the log "thread exiting with uncaught exception". Other SO posts refer to this, but the "cause" is usually a an activity built by the developer. My cause seems to be some Android class. I've tried Project>Clean, but that hasn't changed anything. Also, the app runs fine, even if this error shows up. There doesn't seem to be any rhyme or reason to its appearance. Thoughts?


Log here:



04-09 21:22:49.487: W/dalvikvm(1462): threadid=1: thread exiting with uncaught exception (group=0x40a13300)
04-09 21:22:49.497: E/AndroidRuntime(1462): FATAL EXCEPTION: main
04-09 21:22:49.497: E/AndroidRuntime(1462): java.lang.RuntimeException: Unable to instantiate application com.example.blobtag2.GlobalAppContext: java.lang.NullPointerException
04-09 21:22:49.497: E/AndroidRuntime(1462): at android.app.LoadedApk.makeApplication(LoadedApk.java:501)
04-09 21:22:49.497: E/AndroidRuntime(1462): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4124)
04-09 21:22:49.497: E/AndroidRuntime(1462): at android.app.ActivityThread.access$1300(ActivityThread.java:130)
04-09 21:22:49.497: E/AndroidRuntime(1462): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1255)
04-09 21:22:49.497: E/AndroidRuntime(1462): at android.os.Handler.dispatchMessage(Handler.java:99)
04-09 21:22:49.497: E/AndroidRuntime(1462): at android.os.Looper.loop(Looper.java:137)
04-09 21:22:49.497: E/AndroidRuntime(1462): at android.app.ActivityThread.main(ActivityThread.java:4745)
04-09 21:22:49.497: E/AndroidRuntime(1462): at java.lang.reflect.Method.invokeNative(Native Method)
04-09 21:22:49.497: E/AndroidRuntime(1462): at java.lang.reflect.Method.invoke(Method.java:511)
04-09 21:22:49.497: E/AndroidRuntime(1462): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
04-09 21:22:49.497: E/AndroidRuntime(1462): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
04-09 21:22:49.497: E/AndroidRuntime(1462): at dalvik.system.NativeStart.main(Native Method)
04-09 21:22:49.497: E/AndroidRuntime(1462): Caused by: java.lang.NullPointerException
04-09 21:22:49.497: E/AndroidRuntime(1462): at android.app.LoadedApk.initializeJavaContextClassLoader(LoadedApk.java:377)
04-09 21:22:49.497: E/AndroidRuntime(1462): at android.app.LoadedApk.getClassLoader(LoadedApk.java:320)
04-09 21:22:49.497: E/AndroidRuntime(1462): at android.app.LoadedApk.makeApplication(LoadedApk.java:493)
04-09 21:22:49.497: E/AndroidRuntime(1462): ... 11 more


EDIT - Manifest:



package="com.example.blobtag2"
android:versionCode="1"
android:versionName="1.0" >

android:minSdkVersion="8"
android:targetSdkVersion="15" />



android:name=".GlobalAppContext"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >


android:name=".MainActivity"
android:label="@string/title_activity_main" >






android:name=".ResultsActivity"
android:label="@string/title_activity_results_activity" >
android:name="android.support.PARENT_ACTIVITY"
android:value="com.example.blobtag2.MainActivity" />

android:name=".PlaceActivity"
android:label="@string/title_activity_place_activity" >
android:name="android.support.PARENT_ACTIVITY"
android:value="com.example.blobtag2.ResultsActivity" />






.

stackoverflow.comm

No comments:

Post a Comment

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...