.NET for Android error XA0126

Issue

This issue happens when you are trying to use fast deployment on a device which does not support it. Fast deployment requires features which are not available on devices running API 20 or lower. The Fast Deployment system makes use of the run-as feature of the Android OS. This feature was either not available or had limited capabilities in API 20 and earlier.

Solution

Disable Fast Deployment by setting EmbedAssembliesIntoApk = True in your .csproj. Or turn off Fast Deployment in the IDE. You will still be able to debug on the device, all the required files will be packaged inside the .apk.