xamarin应用程序无法在Visual Studio 2013中部署

问题描述 投票:7回答:1

我尝试了更多来运行我的Xamarin应用程序。它成功构建,但在尝试调试时,以下ecxceptions上升。

据我了解,有一些错过的包,因为

意外的安装输出:错误:无法访问程序包管理器。系统在运行吗?

消息显示在部署状态消息下方。

调试输出

1>_PrimaryCpuAbi=armeabi-v7a
1>Detecting installed packages...
1>Target device is armeabi-v7a.
1>Installing the Mono shared runtime (debug - 1466176850)...
1>10% ... 3776kb of 37460kb copied
1>20% ... 7552kb of 37460kb copied
1>30% ... 11264kb of 37460kb copied
1>40% ... 15040kb of 37460kb copied
1>50% ... 18752kb of 37460kb copied
1>60% ... 22528kb of 37460kb copied
1>70% ... 26240kb of 37460kb copied
1>80% ... 30016kb of 37460kb copied
1>90% ... 33728kb of 37460kb copied
1>100% ... 37460kb of 37460kb copied
1>:Deployment failed
1>Mono.AndroidTools.InstallFailedException: Unexpected install output: Error: Could not access the Package Manager.  Is the system running?
1>
1>   at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName)
1>   at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass90_0.<InstallPackage>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: Unexpected install output: Error: Could not access the Package Manager.  Is the system running?
1>
1>   at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName)
1>   at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass90_0.<InstallPackage>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.<RunLoggedAsync>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.<StartAsync>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.<ExecuteInstantiatedTask>d__20.MoveNext()
1>---> (Inner Exception #0) Xamarin.AndroidTools.AndroidDeploymentException: InternalError ---> Mono.AndroidTools.InstallFailedException: Unexpected install output: Error: Could not access the Package Manager.  Is the system running?
1>
1>   at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName)
1>   at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass90_0.<InstallPackage>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.<RunLoggedAsync>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.<StartAsync>d__98.MoveNext()<---
1>`enter code here`
1>Done building project "App1.csproj" -- FAILED.
1>Build FAILED.
1>
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
visual-studio-2013 deployment xamarin
1个回答
1
投票

您是否使用基于ARM的仿真器(我有同样的问题)?

如果是,则那些非常慢,并且在启动应用程序之前无法部署应用程序。

使用基于x86的仿真器,这些仿真器不是那么快,但至少可以忍受。

在任何情况下(x86或ARM)首先启动您的模拟器,并等到您看到主屏幕。

© www.soinside.com 2019 - 2024. All rights reserved.