.NET for Android error ADB0040

Example messages

error ADB0040: The device does not support the minimum SDK level specified in the manifest.

Issue

ADB0040 means that you are trying to deploy to an emulator or device that has an older Android version than what your .NET for Android application supports.

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

Solution

Verify you are setting the appropriate values for uses-sdk in your AndroidManifest.xml:

<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="27"/>

Your attached device must at least be able to support minSdkVersion.

Implementation notes

Note that nothing in the open source https://github.com/xamarin/xamarin-android repository emits ADB0040, as features such as debugging and "fast deployment" are implemented in the proprietary .NET for Android additions.