I have an app that works fine when deployed locally. I have signed it in eclipse, and the first time i did that it worked. I've made another build, and that works locally, but after i sign it, trying to open it on the phone immediately blows up with:
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.myapp/com.myapp.MyAoo}: java.lang.ClassNotFoundException: com.myapp.MyAoo in loader dalvik.system.PathClassLoader[/data/app/com.myapp-1.apk
I've tried uninstalling and reinstalling. Same thing. Locally deployed, Unsigned app works. Signed app bombs. Any thoughts?
Are you using proguard obfuscation? It will only kick in for signed jars, and will remove classes it deems "unused".
Try turning it off and re-sign and then try again.
To disable make sure that the file: /default.properties does not contain proguard.config property.
see http://developer.android.com/guide/developing/tools/proguard.html for more
This turned out to be some weird setting somewhere. I still haven't really "figured it out". I was using eclipse to export the signed package, but I actually develop with intellij idea. I exported from idea, and it all worked fine.
I had the exact same problem and it baffled me because I had previously signed and exported the apk on numerous occasions without problem. After disabling ProGuard to make sure it was not the cause, I cleaned the project in Eclipse:
From the top menu - click 'Project', click 'Clean' on the drop down menu that appears, select the project(s) to clean and click 'OK'.
After doing that, I was able to run the signed and exported apk without it crashing on startup.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With