Reputation: 4104
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
Upvotes: 232
Views: 165151
Reputation: 1
Uninstalling the application from all users may be the correct solution, but also be sure to check the Secure Folder or something like that for other devices.
I spent 2 hours of my life trying to figure out the reason for the problem (I only have one user on my personal tablet)
The reason I was unable to install the application is because I mistakenly installed the application via direct link from the "Internal Testing" to both current user and my secure folders.
When you have the Secure Folder active, the tablet name appears twice: one or these is the Secure Folder. (accidentally installed on both)
Upvotes: 0
Reputation: 167
uninstall the app from emulate or smart phone and try to run again
Upvotes: 1
Reputation: 20322
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.
Upvotes: 593
Reputation: 163
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
Upvotes: 1
Reputation: 11
cd android
3 next run ./gradlew clean
it clean your build
4 cd..
and run below
5 react-native run-android
Upvotes: 1
Reputation: 11264
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
Upvotes: 1
Reputation: 492
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.
Upvotes: 0
Reputation: 53
In my case. I installed the release-version app. And after uninstall the app from my device. Thing works fine.
Upvotes: 1
Reputation: 10879
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.
Upvotes: 1
Reputation: 2218
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!
Upvotes: 0
Reputation: 1698
Uninstall the apk(app that you are working) from your android device and then run again.
Upvotes: 2
Reputation: 95
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!
Upvotes: 1
Reputation: 395
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 :)
Upvotes: 0
Reputation: 3792
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.
Upvotes: 84
Reputation: 633
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).
Upvotes: 10
Reputation: 11
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.
Upvotes: 1
Reputation: 61
I accidentally had two devices connected.
After removing one device, INSTALL_FAILED_UPDATE_INCOMPATIBLE
error has gone.
Upvotes: 6
Reputation: 1101
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
Upvotes: 0
Reputation: 310
One simple way is rename your package name and run again
Upvotes: -1
Reputation: 2289
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.
Upvotes: 7
Reputation: 7752
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.
Upvotes: 0
Reputation: 126563
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"
Upvotes: 33