[android] 'App not Installed' Error on Android

I have a program working in the Android Emulator. Every now and again I have been creating a signed .apk and exporting it to my HTC Desire to test. It has all been fine.

On my latest exported .apk I get the error message 'App not installed' when I try to install the .apk. It runs fine on the emulators.

As I have mainly been testing on the emulators and only every now and again exporting to a real phone I am not sure when this happened. What is the likely cause of it not installing on a physical phone but running fine in the emulators?

I have tried rebooting the phone & removing the existing .apk, does not fix the fault.

This question is related to android android-emulator

The answer is


Sideloading debug apps for testing on a physical phone worked reliably until I upgraded the phone from Android Pie to Android 10. After that, the "App not installed" error came up every time I tried to sideload the app.

Based on a warning in my AndroidManifest.xml, I changed from...

<application
    android:name=".App"
    android:allowBackup="true" ... />

to...

<application
    android:name=".App"
    android:allowBackup="false" ... />

After that, I was able to sideload my app -- once. Then, I encountered the same "App not installed" error again. By changing allowBackup back to true, it worked again (at least once).

It is obvious from the number of answers and the variation in the answers that there are many reasons for this problem. I'm sharing this in case it helps others.


I also encountered this issue. Kindly try this solution. Make sure that the package name of your project is different from your previous project that was already installed in your mobile phone. I think they get conflict in their names. It works in me.


My problem was similar to that of @Lunatikzx. Because of wrong permission tag which was written as attribute to application:

<application
    android:permission="android.permission.WRITE_EXTERNAL_STORAGE"
    android:label="@string/app_name"
    android:icon="@drawable/ic_launcher"
    android:testOnly="false"
    android:debuggable="true">

What fixed it for me was changing permission tag to separate tag like this:

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

In case, you have your app's older version installed from Google Play and you want to test the newer release version of your app:

  1. Open Google Play Console

  2. Upload the newer release version of your app to Alpha / Beta, but do not release it yet!

enter image description here

  1. You can now download the derived apk:
    enter image description here

Install the downloaded derived apk on your phone now. The derived apk is re-signed by Google Play with a different key from the release app Android Studio generates.


I had the same problem. I did not realise that an app must be signed even for testing.

After self signing it, it installed fine.


In the end I found out that no apps were being installed successfully, not just mine. I set the Install App default from SD card to Automatic. That fixed it.


I faced a similar issue today and at first i thought it was my sd card which corrupted it. I tried it on many devices running android 4.4 and up but it kept bringing the same issue.After some googling and research i realized that i didn't select the v1 jar signature which is for devices older than android 7.0 nougat so i applied both of these signatures by selecting the two check boxes and generated a signed apk and it worked.

enter image description here

Link to solution Android – App not installed error when installing a signed APK – How to Fix


I had the same type of error this was cauysed by this line in my android manifest XML file.

android:permission="android.permission.INSTALL_LOCATION_PROVIDER"

I removed the line and it solved my issue. Hope this helps


for me the cause was that i had multiple builds using different build variants on same phone:

enter image description here

what happened was that some of these builds were built by me, another one was sent to me by another developer.. trying to install the developers while i had other builds (built by me) caused the above error.

so the fix was simple: delete all the builds on my phone (regardless of build variant).. then install the apk sent by my peer.. and it worked like a charm


Open your logCat when trying to install the app. Set it to "No Filters". Search for "InstallAppProgress" package identifier. If the install fails you should see an "Installation error code". In my case it was

D/InstallAppProgress: Installation error code: -7

From here you can use this link to find information about your specific error code.


In my case it was because I was using the alpha version of support library 28. Looks like Google marks these pre release versions as testOnly. If you really want to release like this (for instance, you want to push an internal beta like I did), you can add this line to your gradle.properties file:

android.injected.testOnly=false

I ran into this when I had a bug with my custom build tool that would use ADT with a certificate intended for iOS (It certainly wasn't my first guess, since there doesn't seem to be anything special about the Android certificates other than only you should have one, they are just RSA-1024 certs, even self-signed is ok, at least for non-marketplace installs).


I'd signed the app with 2 different certs, so removing the older version with the older cert and then reinstalling the new one solved the problem for me


I have encountered this issue in various forms, but this time it was a new one:

In this case, I had providers names collision - the same provider name existed in my app and another of my apps.


The "Application not installed" error can also occur if the app has been installed to or moved to the SD card, and then the USB cable has been connected, causing the SD card to unmount.

Turning off USB storage or moving the app back to internal storage would fix the issue in this case.


I also faced the same issue. In my application had services in it. The services was running in the background even after the application was uninstalled, after doing a force stop of the application, got a message saying the application was uninstalled. Then I installed the application with out any problem.


This answer is relevant only for apps that use native libraries (Android NDK).

In my case the problem was that some native libraries were missing from jniLibs for the target phone's CPU architecture. Hence the app was working on the emulator, but on a real phone I got "App not installed".

I had originally copied the compiled native libraries only for the x86 architecture, so the app worked on the emulator. However, the other architectures were missing (x86_64, armeabi_v7a, arm64-v8a). After adding the missing *.so files for all architectures into jniLibs, the "App not installed" error went away.


I had a similar situation.I was able to install app in debug mode using USB but not a signed version. I was able to install signed version on other phone, but not on my device. Numerous reasons and solutions did not help me. But one direction I got from a solution "uninstall for all users". What I did is to again install app in debug mode using USB connection, go to app details and "uninstall for all users" from right top 3 dots - to remove debug version. This looks like cleared all kinds of references. I usually do a normal uninstall.

Now I am able to get signed APK on the device and install and its success.


If you have a previous version for that application try to erase it first, now my problem was solved by that method.


I faced with the same problem. The problem was the main activity in my AndroidManifest.xml file was written twice. I deleted the duplicate.


I had the same problem and here is how solved it : Go to the Manifest file and make sure you have the "Debuggable" and the "Test Only" attributes set to false. It worked for me :)


When this problem happened to me, I fixed it by deleting some non-essential files that I had in my project folder, like the keystore.

In hindsight, it'd probably be bad to give people the keys to your game.


create keystore file through command line

keytool -genkey -alias key_file_name.keystore -keyalg RSA -validity 1000000000000000 -keystore key_file_name.keystore

export apk through Eclipse, right click on Android project Android Tools > Export Signed Application Package, then give keystore location & password.

this will crate signed apk at the same time apk will be zipaligned. And installable.

If you go through command line for all, some times you may face "Application not installed" error. (Application not installed error can happen not only, when using command line. It can be some other reasons as well)


In my case my previous released app had signed by another key, so I've uninstalled it, but on my test phone (LG G4 H-818) 2 users exists so previous app still installed on my phone and didn't uninstalled properly! so when I tried to install it again, it failed...

So I've tried to change user and uninstall previous app, finally app installed properly.

Hope it helps you in future :)


I know this is an old post, but for new users may be useful. I had the same problem: my application worked fine while debbuging. When I signed the APK I got the same message: "Application not installed".

I fixed that uninstalled my JDK (I was using jdk-6u14-windows-x64) and installed a new one (jdk-6u29-windows-x64). After export and sign the APK again, everything was ok!

Resuming, my problem was in JAVA version. Thank's Oracle!!


Sometimes storage not available is also should be mention because I face this issue because that the device that needs to be installed doesn't have enough space and also the system is not alert to the user. You can just find out because of debugging


My problem was: I used the Debug Apk, that was generated while I did the Run command from Android Studio

Solution was: Instead of using this file, clean project and click Build > Build APK(s) from Android Studio. Then you can use the generated APK from the usual folder (app/build/outputs/apk/debug/)

The file that was generated like this installed without a problem.


try to this change in the AndroidManifest.xml:

  • setting debuggable to true
  • signing the apk

Clearly there are many causes of this problem. For me the situation was this: I had deployed to my nexus 7 (actual device) from within the Android Studio (v1.3.2). All worked fine. I then created a signed apk and uploaded to my Google Drive. After disconnecting my nexus from the usb, I went to the settings/apps and uninstalled my app (App1). I then opened google drive and clicked on my App1.apk and chose to install it (need to ensure you have allowed installation of apks in settings). Then I got the dreaded message "App not Installed"

Solution for me: go back into settings/apps and scroll though all apps and at the bottom was a pale version of my App1 (note the original App1 was at the top in Alphabetical order which was deleted as above). When clicking on the pale version it said "Not installed for this user". (I had set up my nexus to have more than one user). But in the top right corner there is a three dot button. I pressed this and it said "Uninstall for all users". Which I did and it fixed the problem. I was now able to click on App1.apk and it installed fine without the error.


In my case i removed Useless permissions that are not required

I Only Needed 1 permission

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

And remove unwanted permissions that are not required and started giving this error

<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.INSTALL_LOCATION_PROVIDER" />
<uses-permission android:name="android.permission.CONTROL_LOCATION_UPDATES" />

I had a similar issue and it was because I was trying to install an apk on a phone with a previous version of the same apk, and both apks hadn't been signed with the same certificate. I mean when I used the same certificate I was able to overwrite the previous installation, but when I changed the certificate between versions, the installation was not possible. Are you using the same certificate?


Apparently this can also be caused by renaming the APK prior to installing it. I wanted to reduce the amount of typing users had to do to get the app from our web site by shortening the file name. After that, they were unable to install it.

Once I reverted to the original file name used when creating and signing the package I was able to update the installed app.


Using Android Studio, I had previously installed the unsigned debug version of the APK (Build > Build APK) and had to uninstall it before installing the signed release version (Build Variants > Build Variant: release, Build > Generate Signed APK).


This can also occur when making a home screen widget, and your widget XML file has an incorrect Activity specified in its android:configure property.


I fixed this by not signing the app first and not with Maven. I added this to my build path.

    <plugin>
        <groupId>com.jayway.maven.plugins.android.generation2</groupId>
        <artifactId>android-maven-plugin</artifactId>
        <inherited>true</inherited>
        <configuration>
            <sign>
                <debug>false</debug>
            </sign>
        </configuration>
    </plugin>

After that I signed my app by hand: jarsigner -verbose -sigalg MD5withRSA -digestalg SHA1 -keystore /home/myself/.android/release.keystore myapp-1.0.apk androidreleasekey


Check with the Android version.

If you are installing non-market apps, and incompatible version you will get this error.

Ex: Application targetted to 2.3.4 Your device is 2.2 Then you will get this error.


If application's not installing, delete the file .android_secure/smdl2tmpl.asec from the SD card.

If the folder .android_secure is empty in the file manager, delete it from the PC.


For those who are using Android Studio 3.

Suryanarayana Reddy's Answer is correct thought it doesn't state steps to solve it, hence.

in your AndroidManifest.xml under the application tag add testOnly="false" and android:debuggable="true" like so:

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/AppTheme"
    android:testOnly="false"
    android:debuggable="true"
    >

Edit
then in AndroidStudio's menubar Build > Build APK(s)


It can also happen if there is not enough space in the internal memory. I had 500Mb free, but it wasn't enough. Try free like 1Gb+.


I had the same issue, i.e. App showed up as being installed, but would not launched when the icon was tapped. After some head-banging, I found that I had stupidly placed ' android:exported="false" ' for my main launcher activity within the AndroidManifest file.... Once I removed it, the App launched fine..


If you are trying to install an apk directly from Google Drive, just restarting the device solved the issue for me.


Make sure that these tips considered:

  1. Your build variants and Flavors should be same(App installed and new one), usually release
  2. Signature file must be the same(*.jks file)
  3. The version you set in build.gradle or AndroidManifest have greater value compared to current version(it is recommended to set version in build.gradle)
  4. URL is correct(doesn't have typo) and server is reachable(WebService/WebMethod/WIFI is running/available and ...)
  5. File downloaded completely
  6. File saved correctly into desired directory
  7. Setting for Data and Type in setDataAndType is correct

I have experienced this "App not installed" error when the device I was installing to didn't have enough storage. Deleting a few files allowed the app to install. Odd that it didn't give me a "not enough space" message instead. (Note: I was installing an apk manually from an "unknown" location.)


open AndroidMainfest then add verionCode, versionName in application tag and make sure debug able equal false:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="...">

<application
    ...
    android:debuggable="false"
    android:versionCode="1"
    android:versionName="1.0"
    tools:ignore="HardcodedDebugMode">
    ...
</application>

then open build.gradle (module:app) make sure verionCode, versionName exited and minsdk <= your mobile sdk:

defaultConfig {
    ...
    minSdkVersion 19
    targetSdkVersion 28
    versionCode 1
    versionName "1.0"
   ...
}

look into sources: https://developer.android.com/studio/publish/

& https://developer.android.com/studio/publish/preparing

& https://developer.android.com/studio/publish/versioning

and https://developer.android.com/studio/publish/app-signing


You should save this as Debug and not release, check the two JAR signs and also allow installing apps from where you have downloaded this (WhatsApp, chrome, etc...)


  1. delete .apk file from build>output>apk folder in your app module(project main module).
  2. delete .idea and .gradle folder from root of the project
  3. clean the project.
  4. click on gradle icon from sidebar in android studio and click sync icon to refresh all project. now run the project and it should work.

If someone is having this issue, check the build number. If your build number is less than the installed app build number, your app will not install and you will get the “Corrupted app or apk file”.

To fix it just increment your build number until it is equal or greater than the installed build number.


I tried all the methods that are generally posted, Was just about to give up, The signing thing solved it.

Found some app that literally said "apk signer", and it did it.


ARGHHHHH! I was trying to install as Unsigned Release APK when the proper setting was DEBUG SDK.

There goes an hour.


If you tried all the answers above and none of them worked, you might want to try this:

If your build variant is 'debug', then you should add this under buildTypes in the app build gradle for the app to install on your device:

debug {
    minifyEnabled false
}

Primarily for older phones

I only encountered the App not installed error when trying to install an apk on my phone which runs on 4.4.2 aka KitKat, but my friend did not encounter this error on his phone which runs on 6+. I tried the other solutions such as removing the old/debug version of the app because the apk was a release version, clearing the debug app's data, and even clearing all of my cached data. Then, finally I realized all I had to do was select both signature versions when building my signed apk.

enter image description here

Before I only had V2 (Full APK Signature) selected, but after selecting V1 Jar Signature as well, I was able to successfully install my signed APK on my 4.4.2 device. Hope this helps others!


I faced this issue with my latest app release to playstore. The issue is combination of change of MainLauncher and app shortcut .

We have added a splash screen and our entry point is SplashActivity instead of MainActivity. So, people who has previous versions and have app shortcut on their home screen can't open the app. It always says something like App not installed toast. This doesn't happen on every launcher (For us it's more common on Samsungs).

Behind the scenes, App shortcut should be seamlessly update entry point from MainActivity to SplashActivity. But, for some reason many third party launchers are not obeying it. The fix is clear the shortcut and add it again.

If you havn't update your app yet in playstore, go through this article.

Beware when updating the launcher activity.


Sometimes it is because you have no enough space on your phone. If so, try to clean up your memory to create space for new installations.


If you are using cordova try to uninstall any previous app that is build through cordova. Strange but this method solved my problem


I faced the issue when I update my android from 2.3.2 to 3.0.1 . If this is the case the IDE will automatically considers the following points.

1.You cannot install an app with android:testOnly="true" by conventional means, such as from an Android file manager or from a download off of a Web site

2.Android Studio sets android:testOnly="true" on APKs that are run from

if you run your app directly connecting the device to your system, apk will install and run no problem.

if you sent this apk by copy from build out put and debug folder it will never install in the device.

Solution :go Build ---> Build APK(s) ---> copy the apk file share to your team

then your problem will solve.


You also may encounter this issue because your device manufacturer did not license the Google commercial apps, such as Play Store, YouTube, Google Maps, etc. Follow this answer to solve the problem.


In my case, it's because Android Studio 3.0 sets android:testOnly="true" on APKs that build from the release Build Variant.

https://commonsware.com/blog/2017/10/31/android-studio-3p0-flag-test-only.html

So run ./gradlew assembleRelease solve my issue


I have also solved this issue,

The problem was that i declared my main activity twice, On as the first activity to load and i specified also an intent-filter for it And once again below it i declared it again .

Just make sure you don't declare your activities twice .


In Marsmallow in owner and guest user is there.If guest installed the same app we can not install the same app in owner.I fixed this delete the app in guest


I found that if I built my app with compileSdkVersion, buildToolsVersion, and targetSdkVersion all set to the default value of 30 in my build.gradle file, then the app would not install on my phone. However, if I changed them back down to version 29, it worked. What the issue turned out to be was that from SDK 30 onwards you need to select V2 jar signing. For more info see Why does the Android SDK 30 generate invalid APK files?


This can happen if you have your MainActivity declared twice in your AndroidManifest.xml.

Another possible reason: you changed the launch activity. Hint: never do it with already published applications! Reasons discussed in Android Developers blog.


My problem was that I have multiple user accounts on the device. I deleted the app on 1 account, but it still was installed on the other account. Thus the namespace collided and did not install. Uninstalling the app from all user fixed it for me.


For me, On Android 9 (API 28), disabling Google Play Protect from play store app worked the trick, and i was able to get rid of the App not Installed error.

To disable Google Play Protect. Open "Play Store" application => tap on Menu button => select "Play Protect" option => Disable the options "Scan device for security threats".