Why does my Android build fail with 'Error executing task LinkAssemblies: error XA2006'?


 

This is an issue that can crop up when updating Xamarin.Forms if the Android targets aren't updated to the latest framework.

Currently, the resolution to this issue is to make sure you have API 21/Android 5.0 installed, & set the Target Framework to Android 5.0 (or "Use latest installed platform.") It's also recommended that you set the Target Android Version to API 21 and the minimum Android version to API 15 or higher. This is considered the supported configuration.

Setting in Xamarin Studio

  1. Right click on the Android project.
  2. Go to Build -> General -> Target Framework.
  3. Set the Target Framework to Android 5.0.
  4. Still in the project options, go to Build -> Android Application.
  5. Set the minimum Android version to API level 15 or higher & the target Android version to API level 21.

Setting in Visual Studio

  1. Right click on the Android project.
  2. Go to "Application" in the project options.
  3. Set the Compile using Android version & Target Android version settings to API level 21 / Android 5.0.
  4. Set the Minimum Android to target setting to API 15 or higher.

Once you've updated those settings, please clean and rebuild your project to ensure your changes are picked up. If the error message still occurs, please check here: How do I contact Xamarin for support?

Last Updated: Oct 31, 2016 05:06PM EDT