Xamarin Android App – Deployment failed due to an error in FastDev assembly synchronization

Sometimes when developing an android application using C# (Xamarin) and when you deploy the android app to the emulator , you might get an error “Deployment failed due to an error in FastDev assembly synchronization”

image

Further when you verify the error , the error would be something similar to the one shown below.

Xamarin.AndroidTools.AndroidDeploymentException: FailedToSynchronizeFastDevAssemblies —> System.NullReferenceException: Object reference not set to an instance of an object.
at Mono.AndroidTools.AndroidDevice.Broadcast(String action, String[] categories, Dictionary`2 extras, String name, String component, CancellationToken cancellationToken)
at AndroidDeviceExtensions.SendSeppukuBroadcast(AndroidDevice device, String packageName, CancellationToken cancellationToken)
at Xamarin.AndroidTools.AndroidDeploySession.WaitForRemoteDirCreation(String destinationPath, CancellationToken token)
at Xamarin.AndroidTools.AndroidDeploySession.InstallAssemblies(String destinationPath, CancellationToken token)
— End of inner exception stack trace —
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)

image

How to fix the Deployment failed due to an error in FastDev assembly synchronization error in Visual Studio 2013 ?

To resolve this issue , follow the below steps
1. Right click on the Android project in the Visual Studio 2013 Solution explorer and select properties.

2. Select “Android Options” from the left sidebar and then navigate to the “Packaging” tab. uncheck the option “Use Fast Deployment(debug mode only).

image

3. Save the project and run it on the emulator.

Leave a Reply