'App not Installed' Error on Android
AndroidAndroid EmulatorAndroid Problem Overview
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.
Android Solutions
Solution 1 - Android
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.
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!
Solution 2 - Android
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".
Solution 3 - Android
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?
Solution 4 - Android
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.
Solution 5 - Android
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.
Solution 6 - Android
I faced with the same problem. The problem was the main activity in my AndroidManifest.xml file was written twice. I deleted the duplicate.
Solution 7 - Android
In my case I had the declared my launcher activity as android:exported="false"
<activity android:name=".MainActivity"
android:exported="false">
I recently targeted android 12 and had to put android:exported
attribute in my manifest components, but did not know what to put as the value. changing the value to android:exported="true"
worked.
Solution 8 - Android
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)
Solution 9 - Android
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.
Solution 10 - Android
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.
Solution 11 - Android
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.
Solution 12 - Android
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 :)
Solution 13 - Android
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!!
Solution 14 - Android
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..
Solution 15 - Android
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.
Solution 16 - Android
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.
Link to solution Android – App not installed error when installing a signed APK – How to Fix
Solution 17 - Android
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.
Solution 18 - Android
If you have a previous version for that application try to erase it first, now my problem was solved by that method.
Solution 19 - Android
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.
Solution 20 - Android
ARGHHHHH! I was trying to install as Unsigned Release APK when the proper setting was DEBUG SDK.
There goes an hour.
Solution 21 - Android
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.
Solution 22 - Android
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 .
Solution 23 - Android
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)
Solution 24 - Android
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).
Solution 25 - Android
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" />
Solution 26 - Android
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.
Solution 27 - Android
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
Solution 28 - Android
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.
Solution 29 - Android
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.
Solution 30 - Android
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.
Solution 31 - Android
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.
Solution 32 - Android
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.
Solution 33 - Android
for me the cause was that i had multiple builds using different build variants on same phone:
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
Solution 34 - Android
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
Solution 35 - Android
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
Solution 36 - Android
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.
Solution 37 - Android
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
Solution 38 - Android
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.
Solution 39 - Android
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+.
Solution 40 - Android
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.
Solution 41 - Android
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.
Solution 42 - Android
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 https://stackoverflow.com/questions/66128615/why-does-the-android-sdk-30-generate-invalid-apk-files
Solution 43 - Android
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
Solution 44 - Android
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.
Solution 45 - Android
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 :)
Solution 46 - Android
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.
Solution 47 - Android
If you are trying to install an apk directly from Google Drive, just restarting the device solved the issue for me.
Solution 48 - Android
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.)
Solution 49 - Android
If you are using cordova try to uninstall any previous app that is build through cordova. Strange but this method solved my problem
Solution 50 - Android
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...)
Solution 51 - Android
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.
Solution 52 - Android
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).
Solution 53 - Android
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
Solution 54 - Android
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
Solution 55 - Android
try to this change in the AndroidManifest.xml:
- setting debuggable to true
- signing the apk
Solution 56 - Android
Make sure that these tips considered:
- Your
build variants
andFlavors
should be same(App installed and new one), usually release Signature
file must be the same(*.jks file)- The version you set in
build.gradle
orAndroidManifest
have greater value compared to current version(it is recommended to set version inbuild.gradle
) - URL is correct(doesn't have typo) and server is reachable(WebService/WebMethod/WIFI is running/available and ...)
- File downloaded completely
- File saved correctly into desired directory
- Setting for Data and Type in
setDataAndType
is correct
Solution 57 - Android
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.
Solution 58 - Android
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
}
Solution 59 - Android
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.
Solution 60 - Android
- delete .apk file from build>output>apk folder in your app module(project main module).
- delete .idea and .gradle folder from root of the project
- clean the project.
- 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.
Solution 61 - Android
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.
Solution 62 - Android
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" />
Solution 63 - Android
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
Solution 64 - Android
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:
-
Open Google Play Console
-
Upload the newer release version of your app to Alpha / Beta, but do not release it yet!
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.