What version of Xamarin.Android added Lollipop support?

PDF for offline use

Let us know how you feel about this


0/250

This guide was originally written for the Android L preview. Xamarin only actively supports the current stable release of the Xamarin tools. The information below is provided "as-is" for older versions of the tools. For the latest information on Xamarin releases, please check here: http://releases.xamarin.com/

"Missing android.jar for API Level 21" in Android L Preview

The following error message (or similar) may show up:

Xamarin Studio:

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Could not find android.jar for API Level 21. This means the Android SDK platform for API Level 21 is not installed.Either install it in the Android SDK Manager (Tools > SDK Manager...), or change your Xamarin.Android project to target an API version that is installed.

Visual Studio:

Error 1 Could not find android.jar for API Level 21. This means the Android SDK platform for API Level 21 is not installed. Either install it in the Android SDK Manager (Tools > Open Android SDK Manager...), or change your Xamarin.Android project to target an API version that is installed.

There are a few workarounds for this issue:

  1. Change your project so that it targets API 19 or lower.
  2. Rename your android-21 folder from android-21 to android-L. (At best, this should only be used as a temporary fix, and it might not work very well at all.)

    • Windows "%LOCALAPPDATA%\Android\android-sdk\platforms\android-21"
    • Mac "~/Library/Developer/Xamarin/android-sdk-macosx/android-21"
  3. Temporarily downgrade back to the Android API Level 21 "L" preview [1]:

    • Windows

      1. Delete the "%LOCALAPPDATA%\Android\android-sdk\platforms\android-21"
      2. Extract [1] into "C:\Users\<username>\AppData\Local\Android\android-sdk\platforms" to create an "android-L" folder.
    • Mac

      1. Delete "/Users/<username>/Library/Developer/Xamarin/android-sdk-macosx/android-21"
      2. Extract [1] into "/Users/<username>/Library/Developer/Xamarin/android-sdk-macosx" to create an "android-L" folder.

[1] - https://dl-ssl.google.com/android/repository/android-L_r04.zip

Xamarin Workbook

If it's not already installed, install the Xamarin Workbooks app first. The workbook file should download automatically, but if it doesn't, just click to start the workbook download manually.