Error building API Level 21

KHTehKHTeh USMember
edited October 2014 in Visual Studio

Hi,

I am using Xamarin Studio 5.5.2 and I am very sure that I have installed API Level 21. However, I keep getting the following error message:

C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2,2): 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 > Open Android SDK Manager...), or change your Xamarin.Android project to target an API version that is installed. (C:\Users\khteh\AppData\Local\Android\android-sdk\platforms\android-L\android.jar missing.) (XamarinStore.Droid)

 Please advise. Thanks.

Regards,
KH

Posts

  • I have this same problem. It just started after Xamarin did its automatic update and updated my Xamarin studio to 5.5.2. When it didn't work in Xamarin Studio I then opened the solution Visual Studio and got the same exception.

    I then uninstalled Xamarin framework and Xamarin Studio and reinstalled both (Xamarin Studio 5.5.0) but still the same error persist. I am very sure I have API level 21 installed, it was checked as installed in Android SDK manager and it is physically present on disk. The only thing I noticed is that there was no folder called android-L instead I have android-21. Can please someone help out here.

    Thanks
    Gboyega

  • irancoiranco USMember

    I have the same problem, in mac.

    /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 > Open Android SDK Manager...), or change your Xamarin.Android project to target an API version that is installed. (/Users/user/Library/Developer/Xamarin/android-sdk-macosx/platforms/android-L/android.jar missing.)

    Please somebody help

  • same problem as well, in MAC

    regards

    Alessandro Facchini

  • i wnt in this folder

    [username]\Library\Developer\Xamarin\android-sdk-macosx\platforms

    and i duplicated the folder "android-21" that was already and i called the duplicated folder "android-L" because if you see the complete test of the error message xamarin is looking for an android-l folder

    bye

    alessandro facchini

  • KHTehKHTeh USMember
    edited October 2014

    I tried renaming AppData\Local\Android\android-sdk\platforms\android-21 to AppData\Local\Android\android-sdk\platforms\android-L. It gets pass the build without error but unfortunately it doesn't start the emulator :-(

  • Navin.2341Navin.2341 USMember

    Facing same issue....sequence of events -
    1. xamarin studio installed an auto-update
    2. When I open my existing project, it asks for android sdk tools 23 installation
    3. I installed everything related to 21 and 23
    4 Now its not building. It keeps saying -
    platforms\android-L\android.jar missing.

    Delaying my delivery today :-(

    This is second issue in two weeks created by xamarin auto-updates.

  • FRRFRR USMember

    Same problem here - updated Xamarin on the weekend, verified SDK 21 is installed, now getting:

    C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(337,2): 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 > Open Android SDK Manager...), or change your Xamarin.Android project to target an API version that is installed.

    Waiting for guidance from Xamarin.

  • for me it worked keeping the android-21 folder and duplicate the same folder in android-L...when xamarin will fix the issue probably it will be enough to delete the android-l folder

    bye

    alessandro facchini

  • JeremyKolbJeremyKolb USMember ✭✭✭

    I'm getting this too all of a sudden even though it was working just fine yesterday with the updated SDK.

  • AlexM.1225AlexM.1225 USMember

    Same issue after update. Duplicated the folder and renamed to android-L and now it works and runs in emulator.

  • JWhiteJWhite USMember, Xamarin Team Xamurai

    Hi Everyone,

    Full support for API 21 is something we are working on. You can get a breakdown of the workaround (and better documentation in it) here:

    http://kb.xamarin.com/customer/portal/articles/1734025

    We will also be posting an announcement a little later today.

This discussion has been closed.