Java – Mono. AndroidTools.InstallFailedException : Failure

Mono. AndroidTools.InstallFailedException : Failure… here is a solution to the problem.

Mono. AndroidTools.InstallFailedException : Failure

I’m having this issue and my app won’t compile. I tried to use the playback service in my application, but it gave me the error that I couldn’t find the resource, I was frustrated and deleted all the xamarin files and reinstalled everything. Now that this error has popped up, this problem is gone. Any help would be appreciated. P.S I am a beginner in android developers. I copied part of the following error:

2>C:\Program Files\Java\jdk1.8.0_91\\bin\keytool.exe -list -alias androiddebugkey -storepass android -keypass android -keystore "C:\Users\xxxx\AppData\Local\ Xamarin\Mono for Android\debug.keystore" 
2>C:\Program Files\Java\jdk1.8.0_91\\bin\jarsigner.exe -keystore "C:\Users\xxxx\AppData\Local\Xamarin\Mono for Android\debug.keystore" -storepass android -keypass android - digestalg SHA1 -sigalg md5withRSA -signedjar bin\Debug\\Messenger.Messenger-Signed-Unaligned.apk C:\Users\xxxx\Desktop\projects\test\Messenger\Messenger\obj\Debug\android\ bin\Messenger.Messenger.apk androiddebugkey 
2>No -tsa or -tsacert is provided and this jar is not timestamped. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date (2046-08-06) or after any future revocation date.
2>C:\Users\xxxx\AppData\Local\Android\android-sdk\build-tools\24.0.1\zipalign.exe 4 "C:\Users\xxxx\Desktop\projects\test\Messenger\Messenger\bin\Debug\ Messenger.Messenger-Signed-Unaligned.apk" "bin\Debug\\Messenger.Messenger-Signed.apk" 
2>:Deployment failed
2>Mono.AndroidTools.InstallFailedException: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]
2>   at Mono.AndroidTools.Internal.AdbOutputParsing.Che`enter code here`ckInstallSuccess(String output, String packageName)
2>   at Mono.AndroidTools.AndroidDevice.<InstallPackage>c__AnonStoreyE.<>m__0(Task`1 t)
2>   at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
2>   at System.Threading.Tasks.Task.Execute()
2>The "InstallPackageAssemblies" task failed unexpectedly.
2>System.AggregateException: One or more errors occurred. ---> Xamarin.AndroidTools.AndroidDeploymentException: InternalError ---> Mono.AndroidTools.InstallFailedException: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]
2>   at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName)
2>   at Mono.AndroidTools.AndroidDevice.<InstallPackage>c__AnonStoreyE.<>m__0(Task`1 t)
2>   at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
2>   at System.Threading.Tasks.Task.Execute()
2>   --- End of inner exception stack trace ---
2>   at Xamarin.AndroidTools.AndroidDeploySession.<RunLoggedAsync>c__async1. MoveNext()
2>--- End of stack trace from previous location where exception was thrown ---
2>   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2>   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2>   at Xamarin.AndroidTools.AndroidDeploySession.<StartAsync>c__async0. MoveNext()
2>   --- End of inner exception stack trace ---
2>   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
2>   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
2>   at System.Threading.Tasks.Task.Wait()
2>   at Xamarin.Android.Tasks.InstallPackageAssemblies.Execute()
2>   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
2>   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
2>---> (Inner Exception #0) Xamarin.AndroidTools.AndroidDeploymentException: InternalError ---> Mono.AndroidTools.InstallFailedException: Failure [INSTALL_FAILED_ UPDATE_INCOMPATIBLE]
2>   at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName)
2>   at Mono.AndroidTools.AndroidDevice.<InstallPackage>c__AnonStoreyE.<>m__0(Task`1 t)
2>   at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
2>   at System.Threading.Tasks.Task.Execute()
2>   --- End of inner exception stack trace ---
2>   at Xamarin.AndroidTools.AndroidDeploySession.<RunLoggedAsync>c__async1. MoveNext()
2>--- End of stack trace from previous location where exception was thrown ---
2>   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2>   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2>   at Xamarin.AndroidTools.AndroidDeploySession.<StartAsync>c__async0. MoveNext()<---
2>
2>Build FAILED.
2>

Solution

Uninstall your app using adb:

adb uninstall <your app's package name>

This clears all remaining Xamarin libraries.

Related Problems and Solutions