I want my Xamarin Android app to support API levels 16 and higher. But I am confused by the fact that there are three different version settings in the properties pane of visual studio.
The names of the properties are
Compile using Android version
Minimum Android to target
Target Android version
Minimum I get. It should be 16. But what about the other two?
Open settings then go to 'About Phone' Tap 'Android Version' to open up a new screen. Now repeatedly tap on the 'Android version' on this screen.
The Latest Android Version is Android 12 This is because each device manufacturer tends to develop and put their own custom “skin” on top of Android. For example, Samsung Galaxy phones have One UI, Xiaomi has MIUI, OnePlus has OxygenOS, and so on, which causes the delay.
Updating the OS - If you have received an over-the-air (OTA) notification, you can simply open it up and tap the update button. You can also go to Check for Updates in Settings to initiate the upgrade.
Let all three settings have the same value:
Set Compile using Android version
to the version that has all the features you need.
Set Mininum Android to target
to Use Compile using SDK version.
Set Target Android version
to Use Compile using SDK version.
If you want to use newer features but still be backwards compatible:
Set Compile using Android version
to the version that has all the features you need.
Set Mininum Android to target
to the lowest version you want to support.
Set Target Android version
to Use Compile using SDK version.
In your code you have to make sure the app works with the minium version as well:
if (Android.OS.Build.VERSION.SdkInt >= Android.OS.BuildVersionCodes.Honeycomb)
{
// Do modern stuff.
}
else
{
// Do it the old-fashioned way.
}
Read more details here: http://redth.codes/such-android-api-levels-much-confuse-wow/
Please check this answer, it is a comprehensive guide about your question: https://stackoverflow.com/a/4994039/2452039
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With