I recently updated to the most recent version of the Android SDK. Before the update my application was working perfectly fine. Now Im getting the following error at the beginning of runtime. I try to debug at the beginning of my first Activity, but my application doesn’t seem to get that far. Does anyone know what I need to do to get my application back up and running?
08-29 13:45:27.974: E/AndroidRuntime(5266): FATAL EXCEPTION: main
08-29 13:45:27.974: E/AndroidRuntime(5266): java.lang.RuntimeException: Unable to instantiate application com.my_application.my_application:java.lang.ClassCastException: com.my_application.my_application
08-29 13:45:27.974: E/AndroidRuntime(5266): at android.app.LoadedApk.makeApplication(LoadedApk.java:490)
08-29 13:45:27.974: E/AndroidRuntime(5266): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3779)
08-29 13:45:27.974: E/AndroidRuntime(5266): at android.app.ActivityThread.access$2200(ActivityThread.java:132)
08-29 13:45:27.974: E/AndroidRuntime(5266): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1082)
08-29 13:45:27.974: E/AndroidRuntime(5266): at android.os.Handler.dispatchMessage(Handler.java:99)
08-29 13:45:27.974: E/AndroidRuntime(5266): at android.os.Looper.loop(Looper.java:150)
08-29 13:45:27.974: E/AndroidRuntime(5266): at android.app.ActivityThread.main(ActivityThread.java:4263)
08-29 13:45:27.974: E/AndroidRuntime(5266): at java.lang.reflect.Method.invokeNative(Native Method)
08-29 13:45:27.974: E/AndroidRuntime(5266): at java.lang.reflect.Method.invoke(Method.java:507)
08-29 13:45:27.974: E/AndroidRuntime(5266): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
08-29 13:45:27.974: E/AndroidRuntime(5266): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
08-29 13:45:27.974: E/AndroidRuntime(5266): at dalvik.system.NativeStart.main(Native Method)
08-29 13:45:27.974: E/AndroidRuntime(5266): Caused by: java.lang.ClassCastException: com.my_application.my_application
08-29 13:45:27.974: E/AndroidRuntime(5266): at android.app.Instrumentation.newApplication(Instrumentation.java:966)
08-29 13:45:27.974: E/AndroidRuntime(5266): at android.app.Instrumentation.newApplication(Instrumentation.java:951)
08-29 13:45:27.974: E/AndroidRuntime(5266): at android.app.LoadedApk.makeApplication(LoadedApk.java:481)
08-29 13:45:27.974: E/AndroidRuntime(5266): ... 11 more
Looks like the problem was the same name for both the package and the sub-package.
So, a minor edit in your manifest should solve it.