Xamarin.Android error ADB0020

Example messages

error ADB0020: The package does not support the CPU architecture of this device.

Issue

ADB0020 means that the built Android APK did not contain a matching Android architecture for the emulator or device it was deployed to.

This message indicates that adb (Android Debug Bridge) reported an INSTALL_FAILED_CPU_ABI_INCOMPATIBLE or INSTALL_FAILED_NO_MATCHING_ABIS error. adb is part of the Android SDK and is used internally by Xamarin.Android to communicate with Android emulators and devices. Learn more about adb from the Android documentation.

Solution

A solution is to add an additional architecture under the Supported architectures in your project options.

You may also modify the MSBuild property, as in the following example that includes all ABIs:

<AndroidSupportedAbis>armeabi-v7a;x86;x86_64;arm64-v8a</AndroidSupportedAbis>

Implementation notes

Note that nothing in the open source xamarin-android repository emits ADB0020, as features such as debugging and "fast deployment" are implemented in the proprietary Xamarin.Android additions.