My Application is running fine in Emulators and even in real devices installed by android studio for debugging purpose, but it is crashing if installed manually using apk fi
If you just upgraded your android studio.
You will not have this option to disable -> Instant Run
. (not on the menu)
Seems like with new android studio and gradle upgrade in order to install an apk you need to properly build it.
Option 1: with gradle from command line
./gradlew :appName:clean
./gradlew :appName:build
Option 2: from android studio
Android Studio -> build -> build APK
(or generate sighed APK)
The generated apk can be installed fine on a device.
Note: if you start a new applicate with this version of android studio you will see that when you run from studio there is no apk generated anymore.
I faced the similar problem.
Note the size of Apk, it would be very small in size , this is because of the instant run feature in enabled. Just disable it
May be Android Studio is not including all files in Apk, when we use the instant run to fasten the process.
Any body know why this happening?
Go to :
Android Studio --> File --> Setting --> Build, execution, deploy --> Instant run.
Just go to:
Android Studio --> File --> Setting --> Build, execution, deploy --> Instant run.
and disable instant run
.
Android Studio --> File --> Setting --> Build, execution, deploy --> Instant run. and disable instant run.