Fatal error on LoadedApk,makeApplication

939 Views Asked by At

I'm developing an application here and it's been working good so far, but now I've put the HoloEverywhere lib to update the layout to the ICS look, and I started getting a random error on startup.

I searched for this error and found out that it could be related to the Eclipse ADT plugin incorrectly building the apk or something like that, but the error doesn't occurs only when I starde from Eclipse, it occurs frequently almost every time I reopen the application after not using it for a while.

And there's really nothing wrong with my application, because it worked well before HoloEverywhere, and when I get this crash (The app crashed everytime I get the error), I just have to reopen it again and it'll work.

This is what I'm getting:

03-01 12:37:03.913: E/AndroidRuntime(29273): FATAL EXCEPTION: main
03-01 12:37:03.913: E/AndroidRuntime(29273): java.lang.RuntimeException: Unable to instantiate application br.uff.uffmobile.context.UffMobileApplication: java.lang.NullPointerException
03-01 12:37:03.913: E/AndroidRuntime(29273):    at android.app.LoadedApk.makeApplication(LoadedApk.java:501)
03-01 12:37:03.913: E/AndroidRuntime(29273):    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4159)
03-01 12:37:03.913: E/AndroidRuntime(29273):    at android.app.ActivityThread.access$1400(ActivityThread.java:134)
03-01 12:37:03.913: E/AndroidRuntime(29273):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1277)
03-01 12:37:03.913: E/AndroidRuntime(29273):    at android.os.Handler.dispatchMessage(Handler.java:99)
03-01 12:37:03.913: E/AndroidRuntime(29273):    at android.os.Looper.loop(Looper.java:137)
03-01 12:37:03.913: E/AndroidRuntime(29273):    at android.app.ActivityThread.main(ActivityThread.java:4856)
03-01 12:37:03.913: E/AndroidRuntime(29273):    at java.lang.reflect.Method.invokeNative(Native Method)
03-01 12:37:03.913: E/AndroidRuntime(29273):    at java.lang.reflect.Method.invoke(Method.java:511)
03-01 12:37:03.913: E/AndroidRuntime(29273):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1007)
03-01 12:37:03.913: E/AndroidRuntime(29273):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:774)
03-01 12:37:03.913: E/AndroidRuntime(29273):    at dalvik.system.NativeStart.main(Native Method)
03-01 12:37:03.913: E/AndroidRuntime(29273): Caused by: java.lang.NullPointerException
03-01 12:37:03.913: E/AndroidRuntime(29273):    at android.app.LoadedApk.initializeJavaContextClassLoader(LoadedApk.java:377)
03-01 12:37:03.913: E/AndroidRuntime(29273):    at android.app.LoadedApk.getClassLoader(LoadedApk.java:320)
03-01 12:37:03.913: E/AndroidRuntime(29273):    at android.app.LoadedApk.makeApplication(LoadedApk.java:493)
03-01 12:37:03.913: E/AndroidRuntime(29273):    ... 11 more

I have also put try/catches everywhere I could to see if I could avoid this nullpointer, but it seems it's either a HoloEverywhere problem or an internal Android bug. I'm testing it with a 4.1.2 android Galaxy S Advance.

0

There are 0 best solutions below