Bug 42770 - Could not find android.jar for API Level 24
Summary: Could not find android.jar for API Level 24
Status: RESOLVED ANSWERED
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.3.1
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-07-23 16:43 UTC by adrianknight89
Modified: 2016-07-24 01:14 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
sdk manager (75.66 KB, image/png)
2016-07-23 16:43 UTC, adrianknight89
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED ANSWERED

Description adrianknight89 2016-07-23 16:43:03 UTC
Created attachment 16771 [details]
sdk manager

I clean installed VS 2015 Enterprise with Update 3 on Win 10 Enterprise. When I create a new Xaml PCL app (version 2.3.1.113-pre3), I cannot compile my Android project. The error message I'm getting is:

Could not find android.jar for API Level 24. This means the Android SDK platform for API Level 24 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-N\android.jar missing.)

In the SDK Manager, it shows that I have API 24 installed. Please see attached image.

As the error indicates, I do NOT have ..\android-sdk\platforms\android-N folder. Instead, I have ..\android-sdk\platforms\android-24 folder. Inside this folder, I have the required jar files. So, the SDK Manager installed API 24 in android-24 folder, but VS is looking for android-N folder.

Please note that I do NOT have any API 24 emulators installed on my machine. My Samsung device also runs on API 23.

My Android build configuration tells me I'm compiling against API 23 with minimum target being API 19. I'm on the alpha channel: Xamarin Android 6.1.99.224

Questions:

1) Why is VS looking for API 24 in the first place? Shouldn't it be 23?
2) Why is VS looking for android-N folder?
Comment 1 James Montemagno [MSFT] 2016-07-24 00:05:26 UTC
I just did a fresh install of VS 2015 + Update 3 Enterprise and none of API 24 was installed and was working out of the box.

Did you previously install the Android SDK separate?
Comment 2 adrianknight89 2016-07-24 01:14:03 UTC
I honestly can't remember, but see my answer here: https://forums.xamarin.com/discussion/comment/211503#Comment_211503

Uninstalling API 24 along with SDK build tools for that API solved the issue.