Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xamarin Application Failed To Deploy in Visual studio 2013

I tried more to run my Xamarin Application. It builds successfully but when trying to debug, the following ecxceptions are risen.

As I understand there is some missed packages because

Unexpected install output: Error: Could not access the Package Manager. Is the system running?

message is displayed below the deployment status message.

Debug output

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 ==========
like image 565
KelishaZ Avatar asked Jun 29 '16 07:06

KelishaZ


1 Answers

Are you using ARM based emulators (I had the same issue)?

If yes then those are very slow and the application cannot be deployed until those are started.

Use x86 based emulators, these are not so fast but atleast bearable.

In any case (x86 or ARM) start your emulator first and wait until you see the home screen.

like image 157
Ashish Sharma Avatar answered Oct 12 '22 13:10

Ashish Sharma