Bug 6221 - VS Project Properties doesn't allow setting AndroidManifest.xml //uses-sdk/@android:minSdkVersion attribute
Summary: VS Project Properties doesn't allow setting AndroidManifest.xml //uses-sdk/@a...
Status: RESOLVED DUPLICATE of bug 10978
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Android ()
Version: unspecified
Hardware: PC Windows
: High major
Target Milestone: ---
Assignee: dean.ellis
Depends on:
Reported: 2012-07-20 17:40 UTC by Darren Abbott
Modified: 2016-08-03 15:23 UTC (History)
8 users (show)

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

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 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:

Description Darren Abbott 2012-07-20 17:40:28 UTC
I wanted to create an app that would take advantage of API level 11, but still run in a reduced functionality mode down to API level 8. 

In my projects settings, I set "Application/Minimum Android to Target" to "Android 2.2" and "Android Manifest/Target API level" to 12 (closest available to 11).  My application wouldn't compile since it was taking advantage of API level 11.  If I set  "Application/Minimum Android to Target" to "Android 3.1", it would compile but wouldn't run on an Android 2.2 machine.

I was able to solve my problem by manually editing AndroidManifest.xml and adding android:minSdkVersion="8" to the uses-sdk attribute.  That allowed be to compile (I had Minimum Android to Target set to 3.1), and since I guarded the API 11 section of my code it would run on a 2.2 machine.

If I understand the setting correctly, "Minimum Android to Target" should have set minSdkLevel automatically, and "Target API level" should have adjusted the compile-time API level.
Comment 1 Jonathan Pryor 2012-07-25 22:16:36 UTC
This is a terminology bug and missing feature: Visual Studio doesn't provide a way to set the AndroidManifest.xml //uses-sdk/@android:minSdkVersion attribute. We should add that.
Comment 2 dean.ellis 2013-07-22 12:01:44 UTC

*** This bug has been marked as a duplicate of bug 10978 ***