Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE] even if app appears to not be installed

AndroidVisual Studio-2013Xamarinxamarin.android

Android Problem Overview


When trying to deploy my app to the Android device I am getting the following error:

Deployment failed because of an internal error: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]

I am aware of this question but the app is not installed. It has been removed/partially removed by Visual Studio during the attempt to deploy.

In the past I solved this by downloading the app from the google play store and then removing it from settings->Application manager. However, now i am getting the error "incompatible update" when it is trying to install it.

I tried to remove it using Titanium Backup and few other things but no luck.

EDIT 1

I realised (from @Motz) that I haven't mentioned that the obvious solution doesn't work. Namely, the app doesn't appear in Settings->Apps

Android Solutions


Solution 1 - Android

I've seen this several times. Usually, it's due to having a signed release version on my phone, then trying to deploy the debug version on top. It gets stuck in an invalid state where it's not fully uninstalled.

The solution that works for me is to open a command prompt and type:

adb uninstall my.package.id

That usually completes the uninstall in order for me to continue development.

Solution 2 - Android

No need to do an adb uninstall, just go to your settings->apps and then do uninstall from there. You will see your application grayed out.

The issues usually has to do with a release vs debug version such as @Kiliman noted here.

Solution 3 - Android

Uninstalling the application would be enough to avoid this problem.

INSTALL_FAILED_UPDATE_INCOMPATIBLE

but sometimes even uninstalling the message is raised again, it occurs in Android OS 5.0 +, so this is the solution:

Go to Settings > Apps and you will find your app with the message:

> "Not installed for this user"

, we have to uninstall manually for all users with the option:

> "Uninstall for all users"

Solution 4 - Android

You have to make sure the application is uninstalled.

In your phone, try going to settings/applications and show the list of all your installed applications, then make sure the application is uninstalled for all users (in my case I had uninstalled the application but still for others).

Solution 5 - Android

I accidentally had two devices connected.

After removing one device, INSTALL_FAILED_UPDATE_INCOMPATIBLE error has gone.

Solution 6 - Android

I usually face this issue on Android 5.0+ version devices. Since it has multi-user profiles accounts on the same devices. Every app will install as a separate instance for all users. Make sure to uninstall for all the users as below screenshot.

enter image description here

Solution 7 - Android

Uninstall the apk(app that you are working) from your android device and then run again.

Solution 8 - Android

You can just add a parameter to run, see:

Run --> Parameters

In field parameters add -cleaninstall

Now just run, they always will do a deep clean before install.

Solution 9 - Android

Ok uninstall the app, but we admit that the data not must be lost? This can be resolve, upgrading versionCode and versionName and try the application in "Release" mode.

For example, this is important when we want to try the migration of our Database. We can compare the our application on play store with actual application not release yet.

Solution 10 - Android

In my case. I installed the release-version app. And after uninstall the app from my device. Thing works fine.

Solution 11 - Android

Signature Mismatch your Previous Present APP and new APK

So Please uninstall the previous app and gradlew clean and again install apk

react-native run-android

react-native run-ios

Solution 12 - Android

  1. Uninstall your app from connected device(emulator or mobile)
  2. got terminal into project folder cd android 3 next run ./gradlew clean it clean your build 4 cd.. and run below 5 react-native run-android

Solution 13 - Android

the first, you must uninstall your app in emulator or device, after that you can cd ./android -> ./gradlew clean then build project again (run android or ios) -> solve

Solution 14 - Android

In my case i was getting this when switched the Minimum target version of the android and when i changed back to original one (when i created project at first). So for that uninstalling worked. But when i changed my android version to latest i was getting it again. To fix that, i went to properties of android project and in Android manifest section, i added a package name e.g com.dotnetdreamer.net. If you have already a package name then you can simply rename it to something else.

Solution 15 - Android

One simple way is rename your package name and run again

Solution 16 - Android

Delete all app files from Phone

To automate the deletion of an app on your phone you can use the steps below. It can be very useful to delete your app and app data on a quick and clean way.

Make a textfile with this code and save it as Uninstall.sh. Go to the folder (where you've put it) of this script in the terminal and do: sh Uninstall.sh YOURNAMESPACE

Now your namespacefolder (including saved appfiles and database) will be deleted.

  echo "Going to platform tools $HOME/Library/Android/sdk/platform-tools"
  cd $HOME/Library/Android/sdk/platform-tools
  echo "uninstalling app with packagae name $1"
  ./adb uninstall $1

Delete all app files from pc

Make a textfile with this code and save it as DeleteBinObj.sh.

find . -iname "bin" -o -iname "obj" | xargs rm -rf

Go to the folder of your project where you place this script and do in the terminal: sh DeleteBinObj.sh

Solution 17 - Android

In case this helps someone, I deployed my app to google play, when I uninstalled it and tried to run a debug on my device (new version) I was getting this failed update message.

I couldn't see the app in my device (it was already uninstalled) so I:

Installed the first version again from google play

Opened Settings/App/App name

Cleared the Data

Cleared the Cache

Uninstalled the app

Now you can deploy the debug version again to the device :)

Solution 18 - Android

If you are using Samsung Device and by any chance marked your app for Samsung Knox, then you need to uninstall it from My Knox app.

Uninstalling just from General apps won't uninstall it from Knox App. It has to be done explicitly!

Solution 19 - Android

Using Ionic with Cordova via command line...

ionic cordova run android --prod

I ran into this and found that I had deleted the release version from a previous test install, but had an old debug version that was hanging out in apps drawer that I missed. I unplugged my device from the computer, opened the app drawer and used "Search apps.." to find all instances of the app to uninstall them. Then I re-plugged in the device to the computer and viola, it worked!

Thanks for the help everyone!

Solution 20 - Android

I Hope this will help somebody in the future but simply go to you config.xml, inside the widget tag, change the default id(io.ionic.starter) to your own id. Have a look at this for android package naming.

Solution 21 - Android

uninstall the app from emulate or smart phone and try to run again

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionYKaView Question on Stackoverflow
Solution 1 - AndroidKilimanView Answer on Stackoverflow
Solution 2 - AndroidJamesMontemagnoView Answer on Stackoverflow
Solution 3 - AndroidJorgesysView Answer on Stackoverflow
Solution 4 - AndroidTerranologyView Answer on Stackoverflow
Solution 5 - AndroidAnu SView Answer on Stackoverflow
Solution 6 - AndroidNagendra BadigantiView Answer on Stackoverflow
Solution 7 - AndroidDean GiteView Answer on Stackoverflow
Solution 8 - AndroidArthur FreitasView Answer on Stackoverflow
Solution 9 - AndroidAlexPadView Answer on Stackoverflow
Solution 10 - AndroidShan LiuView Answer on Stackoverflow
Solution 11 - AndroidKeshav GeraView Answer on Stackoverflow
Solution 12 - AndroidPawanView Answer on Stackoverflow
Solution 13 - AndroidHải Anh NguyễnView Answer on Stackoverflow
Solution 14 - AndroidIdrees KhanView Answer on Stackoverflow
Solution 15 - AndroidMeysam KhoshbakhtView Answer on Stackoverflow
Solution 16 - AndroidRobin BruneelView Answer on Stackoverflow
Solution 17 - AndroidDHLopezView Answer on Stackoverflow
Solution 18 - AndroidUttam ByragoniView Answer on Stackoverflow
Solution 19 - AndroidShane McCurdyView Answer on Stackoverflow
Solution 20 - AndroidZackView Answer on Stackoverflow
Solution 21 - AndroidAbdalmuneim MahmoudView Answer on Stackoverflow