Getting Mono.AndroidTools.RequiresUninstallException on Android

stesvisstesvis USMember ✭✭✭
edited November 2019 in Xamarin.Forms

Today I started getting this deployment error on android:

Severity Code Description Project File Line Suppression State
Error ADB0030: Mono.AndroidTools.RequiresUninstallException: The installed package is incompatible. Please manually uninstall and try again.
at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName) in E:\A_work\267\s\External\androidtools\Mono.AndroidTools\Internal\AdbOutputParsing.cs:line 339
at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass95_0.b__0(Task1 t) in E:\A\_work\267\s\External\androidtools\Mono.AndroidTools\AndroidDevice.cs:line 753 at System.Threading.Tasks.ContinuationTaskFromResultTask1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at AndroidDeviceExtensions.d__11.MoveNext() in E:\A_work\267\s\External\androidtools\Xamarin.AndroidTools\Devices\AndroidDeviceExtensions.cs:line 187
--- End of stack trace from previous location where exception was thrown ---
at AndroidDeviceExtensions.d__11.MoveNext() in E:\A_work\267\s\External\androidtools\Xamarin.AndroidTools\Devices\AndroidDeviceExtensions.cs:line 194
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at AndroidDeviceExtensions.d__11.MoveNext() in E:\A_work\267\s\External\androidtools\Xamarin.AndroidTools\Devices\AndroidDeviceExtensions.cs:line 203
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Xamarin.AndroidTools.AndroidDeploySession.d__112.MoveNext() in E:\A_work\267\s\External\androidtools\Xamarin.AndroidTools\Sessions\AndroidDeploySession.cs:line 414
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Xamarin.AndroidTools.AndroidDeploySession.d__106.MoveNext() in E:\A_work\267\s\External\androidtools\Xamarin.AndroidTools\Sessions\AndroidDeploySession.cs:line 217
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Xamarin.AndroidTools.AndroidDeploySession.d__104.MoveNext() in E:\A_work\267\s\External\androidtools\Xamarin.AndroidTools\Sessions\AndroidDeploySession.cs:line 119 0

It only happens in Debug, but in Release i can deploy and run the app just fine.
Why is this happening?

This morning i installed the Android SDK 10.0 and I suspect it started after that, so now I uninstalled it, but I still can't deploy because of the same error.
Other apps from the same PC can be deployed just fine, so I don't get it...

I did check this out
https://docs.microsoft.com/en-us/xamarin/android/errors-and-warnings/adb0030

but I don't even have my app installed on the device...

Thanks

Best Answer

Answers

  • Thanks, I just had that same issue a moment ago and your suggestion worked for me.

  • deczalothdeczaloth DEMember ✭✭✭

    I had same issue. In my case i wanted to build a Release after while i had a (GooglePlay) published app version. I had to install again my own App from the GooglePlay, delete it and just then build in release mode was possible.

  • rmonfortrmonfort Member

    Go to Settings->Apps select your application and uninstall. It will fix all your problems.
    After that you will able to run and debug your application from IDE.

  • thisismyselfthisismyself Member ✭✭

    @stesvis said:
    I finally was able to get it to run again by:

    • deploying the app in Release mode
    • manually deleting it from the device
    • deploying it in Debug mode

    I had to uninstall on adb command line to fix it:

    adb uninstall my.package.id
    
  • MarkTilleyMarkTilley AUMember ✭✭

    @thisismyself said:

    @stesvis said:
    I finally was able to get it to run again by:

    • deploying the app in Release mode
    • manually deleting it from the device
    • deploying it in Debug mode

    I had to uninstall on adb command line to fix it:

    adb uninstall my.package.id

    Thank you! Randomly had this start happening today out of the blue, this is the way i was able to resolve my issue, thanks!

  • PistoolirapuPistoolirapu USMember

    I had similar issue.

    I also tried the Release option but that caused same error. In addition, tryid to install same software from Play store but error message told that the application is already installed by another user of tablet.

    SOLUTION: Settings --> Apps --> Upper right corner --> Show system apps (turn it on) --> found the software then on the list and Uninstalled it FOR ALL USERS using upper right corder 3 dots. The application icon contained SD card icon on corner of the app meaning it was located in SD card.

    After that Hide system apps just to get cleaner list of apps.

    I assume this were caused when I have used AppMgr III app to move rarely used apps to SD card for saving storage.

  • OverheadOverhead USMember ✭✭

    @thisismyself said:

    @stesvis said:
    I finally was able to get it to run again by:

    • deploying the app in Release mode
    • manually deleting it from the device
    • deploying it in Debug mode

    I had to uninstall on adb command line to fix it:

    adb uninstall my.package.id

    This also worked for me. After updating from Visual Studio 17 to 19 i started getting this error. After i ran the command it worked like a charm!

Sign In or Register to comment.