Android signed application ClassNotFoundException

I have an application that works fine when deployed locally. I signed it in eclipse, and the first time I did, it worked. I did another assembly, and it works locally, but after I sign it, an attempt to open it by phone explodes immediately:

java.lang.RuntimeException: could not create an instance of the ComponentInfo activity {com.myapp / com.myapp.MyAoo}: java.lang.ClassNotFoundException: com.myapp.MyAoo in the dalvik.system.PathClassLoader [/ data / app / com. myapp-1.apk

I tried uninstalling and reinstalling. Same. A locally deployed Unsigned application is running. Signed Apps. Any thoughts?

+8
android google-play
source share
4 answers

Do you use profard obfuscation? It will be used only for signed cans and will remove classes that it considers “unused”.

Try turning it off and recording again, then try again.

To disable, make sure that the file: /default.properties does not contain the proguard.config property.

see http://developer.android.com/guide/developing/tools/proguard.html for more

+4
source share

It turned out to be strange somewhere. I still haven't figured it out. I used eclipse to export a signed package, but I'm really developing with the intellij idea. I exported from an idea and it all worked fine.

+1
source share

I had the same problem and it was confusing to me because I had already signed and exported apk many times without any problems. After disabling ProGuard, to make sure that this is not the reason, I cleaned up the project in Eclipse:

In the top menu - click "Project", click "Clear" in the drop-down menu that appears, select the project to clean and click "OK".

After that, I was able to run the signed and exported apk without crashing it at startup.

+1
source share

I have the same problem and I solved the following:

  • create a folder "libs" in the root folder of the application, if you already have a folder "lib", rename it to "libs"
  • add android-support-v4.jar to the "libs" folder, check if you have in this folder "/ your installation directory android / android / support / v4" if you didn’t get from here
  • Clean project: eclipse -> project -> clean
  • export signed application

for me it works great, I hope this solves your problem too.

0
source share

All Articles