App crashes at .apk - android

The app I created is running great on emulator or on my device when i connect the cable, but when I create an .apk file (I am sending it to myself )and I try to run it on my device in crashes.
In the past it worked in other apps I created but on that case it wont.
I am using the .android/debug.keystore with its default key(android). I've tried to create a new keystore aswell but the app still crashes when I run the apk.
Does anyone have any experience with this kind of error - has any clue how to fix it?
Edit:
the bugSense tells me:
java.lang.NoClassDefFoundError: xx.xxx.xxxxx.xxxxx.CommonUtilities
at xx.xxxx.xxxxx.xxxxx.xxxxxx.onTabChanged(Tabs.java:617)
at xx.xxxx.xxxxx.xxxxx.xxxxxx.initialiseTabHost(Tabs.java:544)
at xx.xxx.xxxxx.xxxxx.xxxxxx.onCreate(Tabs.java:90)

there're two options to your NoClassDefFoundError
ProGuard is shrinking the file and removing/stripping out/re-compressing libraries that your app needs to work.
Your build path is not properly configured and a library you use is not being packed into the .apk
edit:
where's CommonUtilities being defined? External library?

The problem is that I was doing the export of the apk from right click->export!
You must do that kind of export on the final product when it is ready for release.
The right way to export when your app is still on development is right click on the project->Android Tools->Export Signed Application Package.
Many thanks to all for your help learned new things on android from that question.

Related

App Recovery - Decompiling Android Project Classes From APK

I am currently working on an android app but my hard drive unfortunately crashed and I lost all the data on it... I am trying to recover my source code from the debug APK I had installed on my phone (using dex2jar and jd-gui) however, it seems like the classes are not present in the classes.dex and classes2.dex (both files are tiny and do not contain any of the classes in my code, see photo).
I used apk extractor to get the apk from my installed app and I cant seem to get anything close to my original classes... I am wondering if I am doing something wrong to get the APK from the installed app; any help would be greatly appreciated.
Thanks.
For de-compiling your APK to Java classes you can go to this site -
http://www.javadecompilers.com/apk
Just upload your apk and click on decompile. It should work for you !

Why is "Generate Signed APK" disabled in Android Studio?

I know there are a bunch of questions about errors that occur when Generate Signed APK is invoked in Android Studio. However, I can't even get there!
I'm working with Unity and cough cough this is my first time trying to make an Android build. At first I thought maybe Unity would export an Eclipse build but it seems to be more up to date than that.
Anyway, I downloaded Android Studio, and loaded the project, but the button is disabled. I read somewhere about someone having to install gradle manually, but when I looked in the plugins folder of the app, gradle is there.
I thought it might be something to do with not having connected a key store but, apparently you're supposed to do that after you select Generate Signed APK.
Any ideas? Thank you, I'm tearing my hair out.

Android App installed through Signed APK from Eclipse is not opening

I am creating a signed APK.
Through eclipse I was able to create successfully install an app on to my Samsung Tablet. I used the same keystore to create another signed APK and install it and open it. I am able to install but not able to open it errors out. "Unfortunately App Name has stopped"
No Idea why it is not working. This has Google Maps. I am able to install the same app through eclipse via USB and open it. Works great. But when i try to make APK and install it, it fails to open.
Does anybody have a clue why? I'm not sure where the Google key should go or how to debug this issue any help would be appreciated
Probably your Google maps key are bound to your eclipse debug keystore. If you export a app from Eclipse maybe you used another keystore. And then you also need another Google maps key.
After I read some article I found what really is going on
java.lang.RuntimeException: Unable to get provider com.test.data.TestProvider: java.lang.ClassNotFoundException: com.test.data.TestProvider
So I tried so many suggestions like clean and build, setting java class path on properties, changing proguard and many more but this issue is not going away.
Thanks for those that helped me up to this.

signed apk from git shared source is crashing on bogus claims of missing classes

I am working on an android project. The project is shared through git. Each time I need to create a signed apk it's a hassle. The apk gets created but when I try to use the app, some file is always missing. Then I try disconnecting my local copy from the git sharing, then reconnecting, then rebasing, etc. Then it would create a good apk that works with no crash for supposed missing classes. (Note: the classes aren't really missing. They are classes I personally create inside the project)
My problem is, every time I need to create a signed apk, I have to emotionally gear up for a battle. And I have not figured out a repeatable process that is guaranteed to give me a good apk.
I only have this problem when exporting a signed apk. If I simply connect the device and build the code, that version of the app works. But that is not an exported apk, as it is using the debug key.
Does anyone know how to get exported apk to work with my git setup?
MORE DETAILS:
I am using
ADT eclipse
Egit

My published Android application won't install onto devices from the android market

I have compiled my application using nbandroid with netbeans 7.0 on a mac. Then keysigned it with jarsigner and aligned it using zipalign. It uploaded to the market with no issue but it will not install on any device giving the error "invalid package file". I have searched many times, but I have only found solutions on how to fix the problem on the device itself. Does anybody know what might be going on here?
Many Thanks,
Daniel
My app had a similar problem. See this Android Signed APK showing incomplete
In the end, I created an alternative eclipse project, copied all the files from original project and signed it using the original key. Seems like this is some eclipse-android plugin issue.

Categories

Resources