Session 'app': Error Installing APK
Solution 1
Edit:
In newer Android Studio versions you can re-sync the project using this button:
For older versions:
Open Gradle window (on the right side in Android Studio) and click on the refresh button.
However it is not a 100% sure fix.
Solutions for other cases:
Open terminal window and type "adb kill-server", then type "adb start-server". Usually after a few hours of inactivity, adb used to disconnect the device. (If you don't have the sdk/platform-tools in the PATH environment variable, then you should open a terminal in that folder)
One tip if these solutions don't help you: If you open the Event Log window in the right bottom corner of Android Studio, you can see a detailed error message.
Other edge case If you see this error: INSTALL_FAILED_INVALID_APK:... signatures are inconsistent. Then unfortunately a gradle refresh isn't enough, you have to go to Build -> Clean Project and then Run again.
Issue with Android emulator If you want to deploy the APK to an Android Emulator and you see the "Error installing APK" message, your emulator may be frozen and need restart.
Solution 2
Turning off the Instant run removed my error for Androdi Studio 2017.03.03 v2.3
Solution 3
You have to enable Developer options and enable USB Debugging:
- Go to the settings menu, and scroll down to "About phone." Tap it.
- Scroll down to the bottom again, where you see "Build number." (Your build number may vary from ours here.)
- Tap it seven (7) times. After the third tap, you'll see a playful dialog that says you're four taps away from being a developer. (If only it were that simple, eh?) Keep on tapping, and poof, you've got the developer settings back.
http://www.androidcentral.com/how-enable-developer-settings-android-42
Inside Developer Options
, enable USB Debugging
Solution 4
I fix this by delete the build folder then run project again
Solution 5
Try using a different version of Gradle(stable version). To summarize:
- Check your gradle file for debuggable false/true
- Invalidate caches & restart
- Check your install location
- Restart adb
Stanislav Barabanov
Updated on July 05, 2022Comments
-
Stanislav Barabanov almost 2 years
Trying to install app on real device following instructions:- http://developer.android.com/tools/device.html. At end Android Studio giving error:
Session 'app': Error Installing APK
I guess the problem probably can be in my android device(it is chinese Doogee X5). It does not have a given USB Vendor ID in developer docs so I decided to follow instructions with random vendor ID from HTC.
I'm sure there is a way to run application on any android device, but yet I didn't find an answer on how to do that.
I'm running through Linux Ubuntu 14.04 LTS
-
Stanislav Barabanov about 8 yearsThanks, but I've done it before asking. So USB debugging is turned on while I'm getting this mistake.
-
Janki Gadhiya almost 8 yearsYou can comment this after having enough reputation..!!
-
Legoless over 7 yearsFor me I had to turn it off and on again to make it work. Otherwise the fingerprint dialog would not appear.
-
Jorgesys over 7 years@Legoless yes my friend you are right, sometimes the first time doesn´t work apparently and you have to turn it off and on again.
-
russellhoff about 7 yearsUsing latest Android Studio (v2.3), suddenly stopped working and I had that annoying issue. I lost 3 days of my spare time to make it work and finally what you suggested did the trick.
-
MBH about 7 yearsThank you man..you just saved me couple of more hours work to find out the problem.
-
Michalsx about 7 yearsI had to "Build" - "Rebuild project" after I changed debug certificate.
-
Saravanan Sachi almost 7 yearsWindows 10 with Android Studio 2.3 : To open this window, File => Settings, in the left pane Build, Execution, Deployment => Instant Run
-
EsmaeelE almost 7 yearsWhy should change device type for simulation
-
anshulkatta over 6 yearsfor me , disabling the instant run fixed it
-
Alperen over 6 yearsI'm using Xioami Mi4 and this solution works for me. But when I try it on Asus Zenfone 2, it is not necessary to disable "Instant Run". Also, you need to enable "Install via USB" in the developer options if you use Xiaomi.
-
meyasir almost 6 yearsUncheck the Instant Run from
File >Settings >Build,Execution,Deployment > Instant Run
-
Devendra Singh about 5 years@JankiGadhiya You think so much information you can write in comment?
-
Haseeb Zulfiqar about 5 yearsYes I also did so and my problem get fixed.
-
Čamo about 4 yearsWhich emulator? I have Andy and try to fix this error but still no success.