How to overcome app not installed error when building from Android Studio 3.0?

21,916

Solution 1

Well the original question doesn´t have enough information, but we can have some info getting some comments:

  • Android studio 3.0 and compileSdkVersion 26, buildToolsVersion '26.0.2',minSdkVersion 15, targetSdkVersion 26

  • virtual debugging option also on.

  • I am facing same issue after upgrading android studio from 2.3 to 3.0

Ok the message "App Not Installed" will refer to multiple causes, and please returning to Android Studio 2.3. from 3.0 is not an option!

When we upgrade from Android Studio 2.3 to 3.0 we can find some configuration issues caused mainly by the support libraries, that will cause that our application could not be installed.

To avoid this problem we need to invalidate cache in Android Studio 3.0+ and the problem will be solved.

introducir la descripción de la imagen aquí

Please try this option.

Solution 2

First try to generate the debug apk by below steps:

  1. Goto Run
  2. Edit Configurations
  3. select + icon on the left side
  4. Select Gradle
  5. Click the Configuration tab if it is not selected in the right side
  6. In Gradle project add your app as a gradle project
  7. From the tasks select/set "assemble"
  8. Press ok

Now run that configuration. you will have the debug apk ready in build/outputs/apk/app-debug.apk. Now install that apk in any device. It should work.

Solution 3

As of Android Studio 3 the Run-Button builds test-only apks. See documentation

Note: The Run button builds an APK with testOnly="true", which means the APK can only be installed via adb (which Android Studio uses). If you want a debuggable APK that people can install without adb, select your debug variant and click Build > Build APK(s).

This solved my issue: https://stackoverflow.com/a/46661987/7756799

Solution 4

None of the other answers solved the issue. The build and install was going fine when it's triggered from android studio with a device connected to the computer or with an emulator, the only issue was when sending the apk via email or hockey app.

How I could fix it (and this might not be the solution for everybody), I enabled the multidex support by adding this to the default config:

// Enabling multidex support.
    multiDexEnabled true

PS: Usually Android Studio build would fail if the multidex support has to be enabled, in this new version this didn't happen, but my Jenkins build was broken and this is how I could solve it.

Solution 5

Ohh this is exactly we have to do:

  1. Go to Build
  2. Build Apk
  3. Locate Apk
Share:
21,916
Tanmay Sahoo
Author by

Tanmay Sahoo

Leading normal life. Going through challenges.

Updated on July 09, 2022

Comments

  • Tanmay Sahoo
    Tanmay Sahoo almost 2 years

    For giving build for a debug Android app from Android Studio 3.0, it’s not installing in Mobile having Marshmallow and up (in Lollipop not tested).

    I have used many solutions from Stack overflow but it’s still not working.

    It’s always showing App Not Installed on mobile phone.

  • Iqbal Rizky
    Iqbal Rizky over 6 years
    agree with @Jorgesys, happen to me when using another pc, clean, rebuild, and restart solve problem
  • Pang
    Pang over 6 years
    This seems to be just a repeat of this existing answer.
  • Gold Chicken
    Gold Chicken over 5 years
    I have to sign in to up vote your solution. Work for me after a whole day of trying other solutions. (Android Studio 3.3.1)
  • JaydeepW
    JaydeepW about 5 years
    I dont think there is a logical reason why this should work.
  • Ákos Nikházy
    Ákos Nikházy over 4 years
    For me this was the solution.
  • Akash Dahane
    Akash Dahane about 3 years
    This should have been the accepted Answer.