Question

I've developed an app using Cordova 3.3 and Eclipse as IDE. If I build and test the application directly in my device, the app runs perfectly, however when I publish the application in Google Play, it crashes, displaying the following error:

03-19 09:14:32.151: E/AndroidRuntime(15250): FATAL EXCEPTION: main 03-19 09:14:32.151: E/AndroidRuntime(15250): Process: com.mobit.qpedimos, PID: 15250 03-19 09:14:32.151: E/AndroidRuntime(15250): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.mobit.qpedimos/com.mobit.qpedimos.QPedimos}: java.lang.ClassNotFoundException: Didn't find class "com.mobit.qpedimos.QPedimos" on path: DexPathList[[zip file "/data/app/com.mobit.qpedimos-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.mobit.qpedimos-1, /vendor/lib, /system/lib]] 03-19 09:14:32.151: E/AndroidRuntime(15250): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2121) 03-19 09:14:32.151: E/AndroidRuntime(15250): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245) 03-19 09:14:32.151: E/AndroidRuntime(15250): at android.app.ActivityThread.access$800(ActivityThread.java:135) 03-19 09:14:32.151: E/AndroidRuntime(15250): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) 03-19 09:14:32.151: E/AndroidRuntime(15250): at android.os.Handler.dispatchMessage(Handler.java:102) 03-19 09:14:32.151: E/AndroidRuntime(15250): at android.os.Looper.loop(Looper.java:136) 03-19 09:14:32.151: E/AndroidRuntime(15250): at android.app.ActivityThread.main(ActivityThread.java:5017) 03-19 09:14:32.151: E/AndroidRuntime(15250): at java.lang.reflect.Method.invokeNative(Native Method) 03-19 09:14:32.151: E/AndroidRuntime(15250): at java.lang.reflect.Method.invoke(Method.java:515) 03-19 09:14:32.151: E/AndroidRuntime(15250): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) 03-19 09:14:32.151: E/AndroidRuntime(15250): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) 03-19 09:14:32.151: E/AndroidRuntime(15250): at dalvik.system.NativeStart.main(Native Method) 03-19 09:14:32.151: E/AndroidRuntime(15250): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.mobit.qpedimos.QPedimos" on path: DexPathList[[zip file "/data/app/com.mobit.qpedimos-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.mobit.qpedimos-1, /vendor/lib, /system/lib]] 03-19 09:14:32.151: E/AndroidRuntime(15250): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) 03-19 09:14:32.151: E/AndroidRuntime(15250): at java.lang.ClassLoader.loadClass(ClassLoader.java:497) 03-19 09:14:32.151: E/AndroidRuntime(15250): at java.lang.ClassLoader.loadClass(ClassLoader.java:457) 03-19 09:14:32.151: E/AndroidRuntime(15250): at android.app.Instrumentation.newActivity(Instrumentation.java:1061) 03-19 09:14:32.151: E/AndroidRuntime(15250): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2112) 03-19 09:14:32.151: E/AndroidRuntime(15250): ... 11 more

I've checked the paths, class names and package name and they all seem to be right. What else could I check in order to detect the cause of this error? Or at least if I could reproduce the same exact conditions that are making the app crashes, that would be great to debug, so I wouldn't need to wait for the app to be published.

Was it helpful?

Solution

Copied from question body:

Finally, the problem was made by Eclipse. It seems that building the APK, Eclipse was missing some packages. After clean the project and restarting the IDE, the problem was solved and running.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top