Skip to content Skip to sidebar Skip to footer

It Got The 'java.lang.classnotfoundexception' Error When Run The Export Apk

I write a android app in Eclipse and use run command on my cellphone. It's run success on my cellphone. But I use [Android Tools -> Export Signed Application Package...] to expo

Solution 1:

I had same issue, after 2 hours of research I managed to fix this problem by deleting "bin" and "gen" folders and rebuilding project.

Solution 2:

There seems to multiple reasons for this happening from what I have researched. Do you have a lib folder? if so change it to "libs".

Do you have proguard enabled? If so that may cause the problem. Also try unchecking the "Android #.#.#" and "Android Dependencies" in your Build Path, Order and Export.

Check out this thread which has a bunch of other possible solutions, a lot of them deal with setting the proper ActivityName in the manifest file. java.lang.ClassNotFoundException on working app

If those solutions still don't solve the problem try these threads.

Android: Unable to instantiate activity / ClassNotFoundException

ClassNotFoundException Android

Solution 3:

What I had to do is just re-do the building/exporting process with no modification to the code whatsoever. It worked for me, which I did was to export it two times. On my first export, the build APK has lower file size and the second export (with no any modification to the code/configuration) produced a slightly larger file size (about 200KB diff).

This bug in building is really costly, kills you in front of your manager, and should be really fixed by Android/Eclipse team. Kind of sucks

Post a Comment for "It Got The 'java.lang.classnotfoundexception' Error When Run The Export Apk"