Reputation: 13
I'm becoming crazy. I want to compile Xamarin.Forms for Android 8.0 with Visual Studio 2019 I setup all correct, I think, but I always get:
Error The $(TargetFrameworkVersion) for App_test32.Android (v8.0) is less than the minimum required $(TargetFrameworkVersion) for Xamarin.Forms (8.1). You need to increase the $(TargetFrameworkVersion) for App_test32.Android. App_test32.Android
Upvotes: 1
Views: 586
Reputation: 4821
You cannot target 8.0 and that's for a reason. Starting from August 1, 2019 Google doesn't accept new apps that doesn't have targetSdkVersion set below Android 9.0 (for new apps).
You can read more about this here (Meet Google Play's target API level requirement) and more specifically here (Target API level requirements for the Play Console).
If you open the second link, you will see that the targetSdkVersion will be bumped even to Android 10, starting from August 3, 2020 (for new apps)
This is what you are seeing - Xamarin has restricted this, so that you don't set it lower that what it must be. Otherwise, you will be able to build it, but you won't be able to upload it. You can see the minimum version set here
However, you can still set it to 8.0, but you will need to downgrade the Xamarin.Forms & Xamarin.Android to a version that is way back - probably even before 4.0. This way you will be able to build the project, but the end result will be the same - you won't be able to upload the app to the PlayStore.
Useful link to get familiar with the difference between Target Framework
, Minimum Android Version
& Target Android Version
from the official docs
Here is the most important comparison:
Minimum Android Version <= Target Android Version <= Target Framework
To sum up, I will quote again the guys from Microsoft (see in the link above):
We recommend that you explicitly set the Target Android version to the latest version of Android that you use to test your app. Ideally, it should be set to the latest Android SDK version – this allows you to use new APIs prior to working through the behavior changes. For most developers, we do not recommend setting the Target Android version to Use Compile using SDK version.
Upvotes: 1