Session 'app' error while installing APK

I am having difficulty importing a project written on Android Studio 1.1 into Android Studio 2.1.2. I keep getting this error whenever the gradle is building before testing the app on a tablet. Below is a screen shot of the error. Does anyone know what the problem could be?

I have tried adb kill-server followed by adb start-server as well as some other gradle versions compatible with the project. Other than this, I have not been able to find many more suggested solutions to the problem ("session 'app': error installing APK").

Additionally, I have tried uploading a basic Hello World project which successfully built the gradle.

Error message from Grable Build

Initial Error Message

Second set of Errors


I was facing similar kind of problem.There is image of error attached.Error is highlighted in red. Turning off the Instant run removed error for Android Studio 2.3 and 3.1.4.

Error, after running the app Turning off the Instant run


Best step to resolve this error is- Uncheck the instant run in File >Settings >Build,Execution,Deployment > Instant Run


Note: The top answers recommend to disable Instant Run. Try this before exploring my listed solutions to prevent wasting more time than needed.

Here are some possible solutions:

1) Make sure that your phone is properly connected to your PC with a USB cable: Before going over these fixes, make sure that you have at least connected your phone to your computer properly. If it's properly connected, your phone should be charging.

2) Make sure that your device's driver software is up-to-date: Simply go to your File Explorer and then right click Computer. Then, select Manage (requires administrator privileges). In your Computer Management window, find a tab on the left pane that says Device or Device Manager. Search for your device from there. Mine was under Portable Devices and the name started with SAMSUNG, so finding your device shouldn't be too hard. Right click the device, and then select Update Driver Software.... I chose the Search automatically for updated driver software option, since it's much easier.

3) Enable USB debugging under your Developer Options: For my Samsung Galaxy S9, I found mine under Settings > Developer Options. From there, enable USB Debugging. If you can't find your Developer Options, find your build number within the settings and tap it 7 times consecutively. I found mine under Settings > About Phone > Software information.

4) Make sure you've allowed USB debugging for your specific computer: Although you may have your USB Debugging option enabled, you still need to allow USB debugging for your specific computer. A popup should appear asking Allow USB debugging? and providing the computer's RSA key fingerprint. Before pressing OK, make sure your check Always allow from this computer, so that you don't have to go through this again in the future. If you think you've done this but yet your device is still marked as OFFLINE, select the Revoke USB debugging authorization option in 'Developer Options'. Then, re-allow your computer for USB Debugging. If the popup doesn't appear, reconnect your phone to the Computer (pull the cable out and put it back into your Phone).

5) Trying cleaning AND rebuilding your project: In Android Studio, open up the Build tab at the top left and try both the Clean and Rebuild options.

If none of the above works out: Reinstall Android Studio by Uninstalling the program and re-downloading the setup file here. Scan for any viruses that may be affecting your computer. Check for any sort of error while reinstalling Android Studio. If none of the methods presented in this answer work, fetch for support here.

Good luck.


Follow this steps to overcome the issue.

  1. Disconnect all devices connected to System/Close all emulators running on System.
  2. Turn Off Instant Run feature from settings.
  3. Perform a clean build.
  4. Turn ON Instant Run feature from settings.
  5. Perform a clean build.
  6. Connect your device/start your Emulator and ensure it is online.
  7. Run the Project by selecting the device/emulator.

NOTE:-

1) You should not have different instances of Android Debug Bridge(adb) running on system.

2) If using Genymotion then make sure that you use the custom sdk path mentioned in the Genymotion settings the which you mentioned in the settings of Android Studio.

Follow all the steps and I am sure you will get the issue fix.