App crashes after making a signed APK? - android

I have an app that runs absolutely fine when I build it using the debug keystore. For the first time, I made a signed APK for release on Google PlayStore. I transferred the signed apk to my phone via the USB cable, installed the app and now when I try to run it, it crashes. It crashes right when I try to open it.
I have crash reporting enabled via Crashlytics and that doesn't report any new crashes either.
When I build it from Eclipse and run it, it all runs fine.
Where do I look for the problem?
Logcat when the app crashes:
07-16 01:23:28.200: E/ActivityThread(28536): Failed to find provider info for com.facebook.wakizashi.provider.MessagesForegroundProvider
07-16 01:23:28.200: E/ActivityThread(28536): Failed to find provider info for com.facebook.katana.provider.MessagesForegroundProvider

The real issue was that ProGuard could not find certain annotations for Parse library. I had to add the following line to get it to work:
-keepattributes *Annotation*

I assume you made your signed apk with eclipse? You've probably used proguard unintentionally. Try to make it again but pay attention to checkboxes.

Related

I can no longer install android apps with apk

I recently created an android app. When I tried to debug my app on my phone, it worked. Then I generated the apk, and tried to execute it from the file browser, it doesn't work, and I have the following error message : "App not installed", despite having allowed the unknown source in the settings. I also tried with an official app. For that, I extracted the Apk with apk extractor, uninstalled the app, and then executed the apk: same error. I tried many solutions found on the web, but none of them worked :
I disabled play protect.
I reseted the app preferences in the settings.
I tried on my former phone and on my father's phone.
I updated the os on my phone (android 10 to android 12).
I have already installed many apps just by executing the apk on my phones (including my current one) and it's the first time i'm facing this problem.
Can you help me please ?
Debug build and Release build have different signatures so before installing "release app" you should uninstall "debug app".
Also check expiration date of your release signature and make sure it is a valid signature.

App doesn't start when deployed on the market

I have an app that works on my device while debugging on Android Studio. It works too when I generate the apk copy it to my phone and install it from there. But it doesn't work anymore if i install it from the market.
I just have an error message "Unfortunately, xxxxx has stopped". I checked the crash report in Google Play Console but I have 0 crash, at least for now... Is there a way to get some crash log or some clue to debug this ?
Install crashlytics or firebase crash dependencies and you'll be able to see the crash logs on their consoles. If you don't want that, you yourself can override the Thread.UncaughtexceptionHandler and set your custom handler as the default handler. Just Google how to do that as it's a lengthy thing to explain here.
Also if you are using proguard, firebase crash will need other configurations apart from just adding the dependency. Crashlytics handles this on its own.

Issue with Android APK

My app works perfectly when I install it using a usb cable. When I download using HockeyApp or Google Drive it installs, but when I click the app icon it says 'App has stopped'. It will not open the application.
I am using React-Native and Android Studio to build the apk. I generate a signed release and check both signature (v1, v2) boxes.
Any ideas on what the issue could be?
****Edit Fixed****
Thank you for all the suggestions.
I have no idea what changed but I started getting a different error so was troubleshooting the new one and everything started working.
Answer of the following post worked:
error "Could not get BatchedBridge, make sure your bundle is packaged properly" on start of app
For installing an app from any unknown source, you must check it is released app as you define that app is released version then there may be any duplicity in the manifest file.
If you want to check what is the error you must run app from Android Studio and change build variant to relase and for debug app in relase mode
release {
debuggable true
}
it will show what error is comming when you start app in Android Monitor
I'm found similar apk install issue 1month ago
Crash on app(app is New project)
but I’m found resolve way for this problem
The way is add jackOptions, gradle
jackOptions {
enabled true
}
..I have no idea, Why this problem is resolved..
But resolved this problem
good luck

Android APK crashes on run in release mode, but not in debug mode

I have an application that I built in Android Studio. It used to run just fine and has been released to the store in the past, but for some reason the Release APK won't run when installed. The debug runs fine run via phone or emulator. The debug and release builds both use the same keystore file.
Release mode, the APK crashes immediately on open. I suspect it is a keystore issue, but can't be positive??? Does debug bypass using my keystore even though I have it set?
Anything else that I could possibly try?
NOTE: I have another flavor that uses a different keystore and that one works fine.
As requested here as answer :)
Connect the phone to the pc via USB, have android studio open, go to Android Monitor, select your device and look at logcat. I am pretty sure, the exception is there, just waiting for someone to read it. Android Studio logcat logs even store apk's. so publish the release to your phone and just connect it
Thank you, #Adam
Have you used proguard?
If yes I am dam sure its your proguard issue. I would suggest you please read proguard guideline before using it.
It's not proguard. I spent almost two months with this issue of debug build working while release build doesn't work and messed with the proguard files countless times. The problem was instant run. After removing all references to instant run, it finally worked.
You may be able to get additional information by enabling the debugger during release mode. Take a look at this SO thread: Enable LogCat on Release Build in Android Studio. That way you'll be able to see a traceback of the error that's being thrown.
In my case, while opening the release APK the app was crashing. The best way is to see the logcat for knowing the cause of Error. If you have not written any Proguard rules then just goto your build.gradle and change your "minifyEnabled false". This is because ProGuard is obfuscating your APK to make it harder for hackers to reverse-engineering your APK. If you think obfuscation is not needed, change this in your Gradle configuration.just look here.

Android App Crash after applied Proguard

My android app works very well in debug mode and when I generate the signed apk. When I applied Proguard I don't get any error. But when I installed the signed apk with proguard the app crash, I don't know what is the error because I only got "Unfortunately, my app has stopped".
Please give me a cable to know how can I detect what happens with my app, thanks

Categories

Resources