Error while installing APKs

May 31, 2019 0 Comments

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 android android-studio-2.1 shareimprove this question edited Jul 23 ’16 at 15:06   Fruchtzwerg 6,728122837 asked Jul 19 ’16 at 6:08   Randall Reynolds 245135

  • 6 Did you try cleaning the project and then building it again? – Henry Jul 1 project again. – Randall Reynolds J
  •   Be sure to check my answer
  •   I had same problem, cleaning and rebuilding the project did work for me. – WIT_NGU 

add a comment

activeoldestvotes 1 2 next 94

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.

 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

Oh it’s a very common error in Android development( Studio).

I usually run into this. When ever I see the error I just hit shift+F10 again and the application install normally. No issue at all.

Okay you want something more than that fine.

  1. Attach your phone to your PC and give android studio run command, now select the physical device to deploy the build.
  2. Fine now gradle build is started now remove the USB cable from the phone.
    Taada: You got your “Error while installing apk” error.

Another problem might be your system does not have necessary permission to install the app. Just remove the USB cable and attach again. You will see a dialog asking to confirm to add PC as trusted source to “Allow USB debugging”.

Then everything should work properly if not please check these setting:

Now change the USB configuration from “charging” to “MTP (Media transfer protocol)” have a look :

And now my friend you are good to develop.

Bonus: When doing android development a lot of plugging and un-plugging of USB cable happens this result in loosen the port of phone or USB cable. Buying a new USB cable works for me. 9k views · View 3 Upvoters    

  • How do I fix this error regarding APK in Android Studio?
  • How do I solve the error while running the first program on Android Studio?
  • How do I install Android Studio without getting any errors?
  • How do I solve the following error while launching the Android Studio?
  • How do I resolve a build error in Android Studio 3.0?

My team and I have been very excited about Google’s new release of Android Studio 3.1. We have decided to upgraded from Android Studio 3.0.1 to it immediately once it was available in Stable channel without expecting any major problems. Little did we know,

Stable release from Google doesn’t always mean bug free

I am going to discuss about my experience with Google’s Android Studio 3.1.; what’s new about it, what are the issues to expect, and how my team and I have managed to solve them.

Let us begin with Android Studio 3.1. new main features:

  • C++ performance profiler : helps troubleshoot performance issues in app code.
  • Better code support editor in SQL table and query creation statements for Room or SQLite database
  • Added better lint support for Kotlin code

For more new features see: Release Note

Here are some issues we encountered after upgrading to Android Studio 3.1:

Issue #1: “Run” not compiling code


Issue #2: Session ‘app’: Error Installing APK

These two issues (#1 and #2)seem to appear like bugs. The reason behind is either the code does not compile or Android Studio has failed to install the app.

Suggested solution: manually add Gradle-aware Make in Run/Debug Configuration.

Select Run and click Edit Configurations

Make sure, Gradle-aware Make is Added in TaskList or not. If not then:

  • click +
  • select Gradle-aware Make
  • Leave the task empty and select OK

NOTE: Make sure Gradle-aware Make is before Instant App Provision

Issue #3: APK file does not exist on disk

What happened here is because APK file has not been created and there is no error message to show. So, in order to see what went wrong, click on Toggle View on the left side menu (see image below). You will see a list of error messages.

Note: Some might suggest to disable Instant Run. It might help in some cases.However we need to keep in mind that Instant Run is one of the most useful features in Android Studio to speed up build process.


Here are some solutions to try out if you are having problems building Android project (not just on Android Studio 3.1):

  • Sync / refresh Gradle
  • Build → Rebuild

Leave a Reply

Your email address will not be published. Required fields are marked *