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
Related
I launched and debugging my application successfully by Android Studio via USB.
But if I copied APK from \app\build\outputs\apk the application crashed after installation.
What's difference between installed APK and launched via Android Studio?
How to fix trouble?
try enable multidex
defaultConfig {
...
// Enabling multidex support.
multiDexEnabled true
}
try also Disable InstaRun
Go to Preferences and find the Instant Run option under Build, Execution, Deployment. Uncheck the check boxes to disable instant run
clean and delete debug.apk.
and try Build>BuildAPK again
Hope it works. . if stills fail then you should make release apk instead.
Not sure if this is what is causing your trouble but when I had my app installed on the system and didn't change the app for a signed one it'd crash.
So what I'd do is to make sure that the app is uninstalled from your phone and then build a signed APK to use.
Delete debug.apk from output folder under build in app. Generate again using Build->Build APK option and install again.
Have these erro when i'm trying to build the apk to some devices. Have no idea whats going on.
I get that when i build and install apk on device at the first time.
Someone have some tips for that?
[[EDIT]]
Well, after creating a debug key on keystore, i can build and deploy the apk via ADP to the device. But, dont know why, the error just return...
And now, we have other error:
UPDATE:
I Fix that issue removing all Android SDK and Android Studio and ReInstall it.
The problem can be solved by addding the install flags -r -t in the Run/Debug Configuration Dialog like it's showed in the given image
You can find Run/Debug Configuration Dialog location here according to Jetbrains.
UPDATE: Depending on the Android Studio version the Run/Debug Configuration position in the IDE can be slightly different, but always refer Jetbrains to find whatever you are looking for
When you've installed an APK from another source, Android Studio warns you before overwriting.
For example, if I've developed an application, uploaded it onto the Google Play Store, downloaded it, then try to re-deploy that same application from Android Studio, I'll get this warning.
It's trying to tell you that the way the package is signed is different; it's warning you that another app might be masquerading as the original.
The reason is you are trying to install the application with the same package name.
If you have already downloaded the same application from the play store /app market, then simply uninstall that application and RE-RUN.
This error can also occur if you recently switched branch which had different build variants declared in build.gradle file and you didn't perform gradle sync.
For example you had release and debug and then you switched to branch which has releas, deubg and staging variants; your project will still build but while installing apk this error can pop up.
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.
I installed the app through android studio and its working fine, but when I create the apk and then I installed the apk, on some devices my app is crashing.
Can someone know how we can see the logs or errors in case when we installed through apk, in can't debug the app bcos its working that time.
here are few details,
build variant: debug,
my apk name: app-debug.apk,
and I am using 2 3rd party libs as an .aar files
If you have installed the apk also you can able to get the logs if you have connected your device with studio. For that you have set the No Filter in Android Monitor.
In the phones, your app is crashing, don't just install the app by apk there. May be some of your 3rd party dependency is not compatible with those versions or phones.
Debug your app in those phone with cable and check error logs. You will get to know the problem
I get this error while trying to upload an apk on google play:
You uploaded a debuggable APK. For security reasons you need to
disable debugging before it can be published in Google Play.
I am using phonegap build (version 2.9)...I still uploaded an apk for the same app about 3 weeks ago without any issue. The solutions I found online has to do with the android manifest file which phonegap build doesn't have...
I think in BuildConfiure.java make DEBUG = false; while deploying .apk i think we should make it false
Had to edit the app with with apktool, made the change to the AndroidManifest.xml, then re-sign with jarsigner and finally wrapped it up with zipalign....it uploads correctly now...I guess the problem was that phonegap build changed the way they build android apks
Add
android:debuggable="false"
into manifest.
And also back to the PhoneGap Build interface, clicked Settings, unchecked the "Enable Debugging" box and then recompiled.