2016-11-11 122 views
1

我的應用程序沒有錯誤,但是當我嘗試調試應用程序,然後部署失敗,並沒有錯誤,給我這樣的輸出:部署失敗的錯誤:Mono.AndroidTools.InstallFailedException:失敗[INSTALL_FAILED_UPDATE_INCOMPATIBLE]

: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(Task 1 t) 1> at System.Threading.Tasks.ContinuationTaskFromResultTask 1.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(Task 1 t) 1> at System.Threading.Tasks.ContinuationTaskFromResultTask 1.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(Task 1 t) 1> at System.Threading.Tasks.ContinuationTaskFromResultTask 1.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.`

我不知道爲什麼我得到這個,我怎樣才能消除這個錯誤。我是xamarin.android的新手,因爲我不知道我到底需要做什麼。我試圖從谷歌幫助,但我無法得到它。我可以幫助我,因爲過去幾天我被困在這裏。

回答

2

INSTALL_FAILED_UPDATE_INCOMPATIBLE發生在您的手機上已經有調試版本並嘗試覆蓋發行版本時,反之亦然。當你的新版本發生重大變化時也可能發生。

轉到設置和應用程序管理。你會發現你的應用程序包含程序包名稱,將其卸載並再次嘗試部署。

它應該解決這個問題。

+1

您可能還需要通過命令行卸載應用程序: adb uninstall com.mydomain.myapp –