Could not find android.jar for API Level . Xamarin

Viewed 17859

When I want to start my project I have a mistake

Severity Code Description Project File Line Suppression State Error Could not find android.jar for API Level . This means the Android SDK platform for API Level 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:\Program Files (x86)\Android\android-sdk\platforms\android-\android.jar missing.) myproject.CrossPlatform.Droid

I read the same mistake and there has a decision to install old verion of Visual Studio. Maybe is another way to fix it??? Cuz to install old version it is a problem.

3 Answers

There are three Android API you need to know,

1.Target framework :Specifies which framework to use in building your application. This API level is used at compile time by Xamarin.Android.

2.Minimum Android Version :Specifies the oldest Android version that you want your app to support. This API level is used at run time by Android.

3.Target Android Version: Specifies the version of Android that your app is intended to run on. This API level is used at run time by Android.

Before you can select a Target or Minimum API level in Xamarin.Android, you must install the Android SDK platform version that corresponds to that API level. The range of available choices for Target Framework, Minimum Android version, and Target Android version is limited to the range of Android SDK versions that you have installed.

How to install Android SDK:

Tools--Android--Android SDK Manager,then you can choose Android SDK to install.

enter image description here

I've got everything checked in Android SDK dialog, but jar was missing for some reason.

What worked for me - remove check mark from sdk, press apply, agree to uninstall and install again.

I've been having this same issue for a couple of days now. From the System Settings > Andoid SDK menu click on the SDK Tools tab and uncheck "Hide Obsolete Packages option". From the list of items check 'Android SDK Build-Tools 32', 'NDK (Side by side)', 'Android Emulator', 'Android SDK Platform-Tools', 'Android SDK Tools (Obsolete)'. Click on apply, then just follow the prompts to install the packages.

After this, click on the SDK Platforms tab and check the 'Android API 32' option, click Apply and follow the prompt to install.

You guys should try just the second paragraph without the first to see if it works cause it was after this last step that mine did.

Related