24

My problem is related to this post Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE] even if app appears to not be installed

I am not able to deploy my app on a real device it works properly on the emulator , i get deployment error, but nothing in the errors tab.

This is from build output

2>Build succeeded.

2>An error occured. See full exception on logs for more details.

2>The installed package is incompatible. Please manually uninstall and try again.

2>

========== Build: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ========== ========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

even after uninstalling the app i was not able to deploy my app on my real device , other apps install fine thorough VS.

Zany
  • 1,015
  • 1
  • 10
  • 18
  • If you perform a manual install via `adb` (`adb install xxxxx.apk`) using the debug|release built apk, what is the full logical error? – SushiHangover Jun 24 '17 at 11:06
  • Remove all xamarin shared libraries you can find on your phone – hugo Jun 24 '17 at 15:59
  • @SushiHangover im not sure what you are trying to say , if i use debug/release method to install that is what i get in output , there is a dialogue saying there were deployment errors continue? , i get one error saying "The referenced component System.objectmodel could not be found, but i dont think that is the problem , since it works correctly on the emulator. – Zany Jun 25 '17 at 06:56
  • @hugo how to do that , remove form my phone? – Zany Jun 25 '17 at 06:56
  • @Zany Manually install the apk into the device using `adb` and see what the failure message is in logcat – SushiHangover Jun 25 '17 at 07:41
  • @Zany in the control panel. You can find all Xamarin libraries in the list of installed applications. – hugo Jun 25 '17 at 11:19
  • I experienced this myself as well. Even though it is not an optimal solution, you can change the bundle id for your application before building locally. At least that should help you to deploy the application to your phone for now. – Demitrian Jun 25 '17 at 18:40
  • ok i tried many times the app installs properly on other devices , @SushiHangover i used adb to try and install , it seems only this app doesnt install on a particular device , works everywhere else the error is adb: error: cannot stat 'Master\Bunk_Master.Android\bin\Release\Bunk_Master.Android-Signed.apk': No such file or directory – Zany Jun 26 '17 at 12:49
  • @SushiHangover i confirmed using adb this app installs properly on other devices i found another post with similar problem but that didnt work out either. https://stackoverflow.com/questions/43428085/how-to-convince-visual-studio-to-use-adb-for-android-dev-over-tcp-ip – Zany Jun 26 '17 at 12:51
  • @Demitrian yes your solution works but every time this happens i need to change the name. – Zany Jun 26 '17 at 13:38

9 Answers9

55

There is no specific solution available for this problem , i think the reason is your phone OS doesn't completely uninstall your app, the app signature still lingers on(happens with heavily customized android, in my case its MIUI 8 ). I found out using logcat - signatures do not match the previously installed version

Potential Solution 1: Use Titanium Backup (Requires Root) to remove the app folder completely after uninstalling the app.

Potential Solution 2: Go to settings and remove the app from there , make sure to use the option uninstall for all users(in MIUI 8 this wasn't available)

Potential Solution 3: Use adb to uninstall your app completely its same as uninstall for all users.

adb uninstall yourpackagename

Incase you dont know it check in properties of your android solution.

Another way to find it how to delete an app from adb without knowing it's package name

adb root

Then enter adb shell

adb shell

Find out your apps package name:

pm list packages | grep "your app name/something related to your app name"

Then use:

adb uninstall

OR

pm uninstall

Potential Solution 4:(Not really a Solution) Change the app package name - wont conflict with the one you have already installed

Note:Doing a hard reset of your device should solve the issue obviously.

In my case 4th option worked, if anyone knows how to remove the previously installed app signature from android please let me know i will update the answer accordingly(probably requires an in-depth knowledge of the file system).

Zany
  • 1,015
  • 1
  • 10
  • 18
  • 3
    A 5 solution worked for me. Reinstall the apk in the distributed version and then remove it from the android menu. Then I was able to deploy the debug version. – Gustavo Rossi Muller Nov 29 '18 at 12:02
  • @GustavoRossiMuller Good that such a simple method worked for you, I did try that and it didn't work. I think I wasn't able to install it even with an apk on the device memory. Iv move on to stock Android for my dev, don't want these type of problems from ruining my productivity. – Zany Dec 02 '18 at 14:28
  • 3
    Solution 3 worked for me : launch ADB command prompt and execute "adb uninstall yourpackagename", thank you @Zany ! – Jean-Daniel Gasser Dec 10 '19 at 06:30
  • 3
    Solution 3! – wallef Dec 10 '19 at 10:14
4

There have a Simple hack

  1. if a Brand new application - then simply Change Android Package Name and Deploy from VS
  2. if already play store publish one - then install app through play store and uninstall. then deploy from VS

this Works for me

manna
  • 131
  • 11
2

enter image description hereA quickly solution is by changing the package name in android manifest.

MATCH
  • 100
  • 10
1

Go to real device Settings->Apps->All Apps, Now uninstall all the xamarin and mono packages as well as if the Debugging App is there also uninstall it and run again, This solved my same problem.

Sabir Hossain
  • 1,183
  • 1
  • 25
  • 46
0

I know this is an old question, but it could be due to your build configuration. The Release and Debug configurations can and should be different w/r/t manifest entries, etc. I get the ADB0030 error if I try to deploy my Debug configuration. FYI.

Omortis
  • 1,334
  • 19
  • 44
0

I've tried to uninstall app and it has disappeared from Finder. However I received this error. Then I've used a utility (ie. Service Disabler) and the utility listed the app, then I've uninstalled by using utility's Uninstall menu. All gone.

Nime Cloud
  • 6,162
  • 14
  • 43
  • 75
0

If you have this problem, that's simple, if you have an older .apk of your application, then install this .apk, and after you uninstall. This is the simple solution.

Dharman
  • 30,962
  • 25
  • 85
  • 135
0

I had the same problem and I solved it by disable ransomware protection in Windows 10

Yusuf
  • 140
  • 11
0

I installed the app from Play Store, and then uninstalled from there. This seemed to remove it correctly from the device.

James Westgate
  • 11,306
  • 8
  • 61
  • 68