Fast Deployment of App to Android Emulator Always Fails
Asked Answered
L

5

16

I am attempting to Use Fast Deployment to quickly test my Android App in the emulator. I am doing this because, as you probably know, building and testing an app on the emulator is incredibly slow and quite frustrating so I need to speed this up.

PS: If you have any advice on how you can deploy and run an app on an emulator in under 30 seconds I'd greatly appreciate it. My app is tiny and simple so it shouldn't take bloody 1.5 mins to run on the emulator?

The deployment is failing and giving me the error:

Xamarin.AndroidTools.AndroidDeploymentException:
FastDevDirectoryCreationFailed at
Xamarin.AndroidTools.AndroidDeploySession.WaitForRemoteDirCreation(String
destinationPath, CancellationToken token) at
Xamarin.AndroidTools.AndroidDeploySession.InstallAssemblies(String
destinationPath, CancellationToken token) at
Xamarin.AndroidTools.AndroidDeploySession.FastDev(Boolean useExternal)
at Xamarin.AndroidTools.AndroidDeploySession.Run(CancellationToken
token) at
Xamarin.AndroidTools.AndroidDeploySession.RunLogged(CancellationToken
token) at
Xamarin.AndroidTools.AndroidDeploySession.Start(CancellationToken
token)

How I can fix this error? And successfully Use Fast Deployment and deploy it to the emulator? How you speed up Android emulator deployment and testing?

Relevant information:

  • On Windows 8.1 Surface Pro 2 (4gb ram)
  • Using VS2013 Professional
  • The Android emulator is a Nexus (API 21) CPU = Intel ATOM x86. I am using this because Xamarin suggests this to speed up deployment.
  • The project uses Xamarin and MVVM Cross

If I deploy to a different emulator using Use Fast Deployment I get no deployment error but when the app runs it crashes immediately with: Unfortunately 'app' has stopped

Laundryman answered 6/9, 2015 at 1:54 Comment(4)
Did you try removing the shared runtime from the emulator so it gets installed again next time? As for the emulator speed i would suggest looking into the Xamarin Android player: xamarin.com/android-player for me it installs and runs the app within 10 seconds.Hansen
Use Fast deployement also ,go to linker section "Choose linking 'None' "...do it its worked...Bloodstock
My best suggestion is Use physical device to debug a app..or install visual studio android emulator...its more fast compared then native emulatorBloodstock
Use Genymotion or Xamarin Android Player, after it crashes check the output details and post them here, it should give the reason why your app stopped workingSchoolfellow
M
8

Though I don't know what fast deployment is, I can however suggest a very fast emulator - Genymotion. I use it for my app and it deploys in under 10 seconds. Below is the link. https://www.genymotion.com/

Membrane answered 8/9, 2015 at 6:23 Comment(0)
A
4

A few quick points, the document recommends using the Xamarin Android Player, so I would recommend using that too. If you don't really need to use a simulator, then deploying to device is also nice and quick too. That said, this scenario should work, is it possible to send over some more details on your issue to [email protected] and someone should be able to help (and mention I sent your issue this way?

Alfieri answered 8/9, 2015 at 16:22 Comment(0)
M
2

If Genymotion doesnt work for you try Andy emulator. If both are still too slow for you try using xamarin studio with genymotion

Mf answered 13/9, 2015 at 22:48 Comment(0)
B
0

Visual Studio Emulator for Android

also works very well. It uses hyper-V, so no need to install VirtualBox like GenyM, which can cause conflicts with hyper-V if you're doing windows developement at the same time.

Bathy answered 18/3, 2016 at 12:17 Comment(0)
R
0

For me, this error just randomly started appearing when trying to build from Visual Studio. It seems like something was wrong with the phone.

I cleared the phone's cache and I was able to install the app through Visual Studio again. To clear a phone's cache, you usually need to turn it off and then turn it back on in "Recovery booting". Usually this means holding some combination of volume button/power button/main button. Once booted in this mode, you should be able to see a "clear cache" option and then restart.

Repeater answered 24/11, 2016 at 23:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.