deploy fail Error: Mono.AndroidTools.InstallFailedException: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]

别说谁变了你拦得住时间么 提交于 2020-01-23 03:42:26

问题


My application has no error, but when I try to debug the application then deploy fail with no error and give me this output:

:Deployment failed 1>Mono.AndroidTools.InstallFailedException: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE] 1> at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName) 1> at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass90_0.b__0(Task1 t) 1> at System.Threading.Tasks.ContinuationTaskFromResultTask1.InnerInvoke() 1> at System.Threading.Tasks.Task.Execute() 1>The "InstallPackageAssemblies" task failed unexpectedly. 1>System.AggregateException: One or more errors occurred. ---> Xamarin.AndroidTools.AndroidDeploymentException: InternalError ---> Mono.AndroidTools.InstallFailedException: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE] 1> at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName) 1> at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass90_0.b__0(Task1 t) 1> at System.Threading.Tasks.ContinuationTaskFromResultTask1.InnerInvoke() 1> at System.Threading.Tasks.Task.Execute() 1> --- End of inner exception stack trace --- 1> at Xamarin.AndroidTools.AndroidDeploySession.d__99.MoveNext() 1>--- End of stack trace from previous location where exception was thrown --- 1> at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 1> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 1> at Xamarin.AndroidTools.AndroidDeploySession.d__98.MoveNext() 1> --- End of inner exception stack trace --- 1> at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) 1> at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) 1> at System.Threading.Tasks.Task.Wait() 1> at Xamarin.Android.Tasks.InstallPackageAssemblies.Execute() 1> at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() 1> at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() 1>---> (Inner Exception #0) Xamarin.AndroidTools.AndroidDeploymentException: InternalError ---> Mono.AndroidTools.InstallFailedException: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE] 1> at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName) 1> at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass90_0.b__0(Task1 t) 1> at System.Threading.Tasks.ContinuationTaskFromResultTask1.InnerInvoke() 1> at System.Threading.Tasks.Task.Execute() 1> --- End of inner exception stack trace --- 1> at Xamarin.AndroidTools.AndroidDeploySession.d__99.MoveNext() 1>--- End of stack trace from previous location where exception was thrown --- 1> at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 1> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 1> at Xamarin.AndroidTools.AndroidDeploySession.d__98.MoveNext()<--- 1> 1>Build FAILED.`

I have no idea why I am getting this and how can I remove this error. I am new in xamarin.android there for don't know what exactly I have to do. I try to take help from google but, I am not able to get it. Can one help me as I am stuck here from past few days.


回答1:


INSTALL_FAILED_UPDATE_INCOMPATIBLE happens when you already have a debug version on your phone and try to overwrite release version, or vice versa. Also it may happen when you have major changes in your new build.

Go to settings and app management. You will find your app with a package name, uninstall it and then try deploying again.

It should fix the issue.




回答2:


Ensure that you are in debug mode. In Visual Studio, right-click on your project under the Solution Explorer and select Properties. Under the Android Options page , Click the Advanced button and under Supported architectures , check the architectures that you want to support: armeabi for emulator , x86 for mobile (you can check both)



来源:https://stackoverflow.com/questions/40541529/deploy-fail-error-mono-androidtools-installfailedexception-failure-install-fa

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!