Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cant Deploy To Real Android Device Xamarin

Tags:

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.

like image 593
Zany Avatar asked Jun 24 '17 10:06

Zany


People also ask

Is xamarin deprecated Android?

Not dead but possibly moribund. In May 2020, Microsoft announced that Xamarin. Forms, a major component of its mobile app development framework, would be deprecated in November 2021 in favour of a new . Net based product called MAUI - Multiform App User Interface.

Is xamarin good for Android development?

Ultimately, appreneurs should use Xamarin for building mobile apps, as the platform offers an excellent means to build mobile apps without utilizing OS-specific languages like Swift or Java. The advantage of this is more efficient and comprehensive development as codebases can be shared cross-platform.


2 Answers

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).

like image 193
Zany Avatar answered Sep 30 '22 18:09

Zany


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

like image 35
manna Avatar answered Sep 30 '22 18:09

manna