问题描述
我在我的 Windows 10 机器上并排安装了 VS2017 和 VS2019.
I have VS2017 and VS2019 installed side by side on my Windows 10 machine.
我无法编译 Xamarin Android 4.1 项目(在 VS2019 中),除非我将它们升级到 4.4,这似乎是我可以在 VS2019 中定位的最低 Android SDK 版本.VS2017 编译正常.
I can not compile Xamarin Android 4.1 projects (in VS2019) unless I upgrade them to 4.4 which seems to be the minimum Android SDK version I can target in VS2019. VS2017 compiles fine.
如果我在 VS2019 中创建一个新的 Xamarin Android 项目,我可以选择 4.4 及更高版本,但在 VS2017 中,我可以直接回到 2.3.两个 Visual Studio Xamarin 设置都指向 android-sdk 的相同位置(在我的 D: 驱动器上,但我确实将其复制到标准安装位置以验证它没有将其用作默认值,这没有区别)
If I create a new Xamarin Android project in VS2019 I can select from 4.4 and above, but in VS2017 I can target right back to 2.3.Both Visual Studio Xamarin settings are pointing to the same location for the android-sdk (which is on my D: drive, but I did copy it to the standard install location to verify it was not using this as a default, which made no difference)
VS2019 最低安卓版本
VS2017 最低安卓版本
是否可以使用 VS2019 以 Android 4.1 为目标?
Is it possible to target Android 4.1 using VS2019?
推荐答案
在使用您的 Android 版本做出决定时,请使用以下内容:
Use the following when making decisions with your Android versions:
minSdkVersion (lowest possible) <=
targetSdkVersion == compileSdkVersion/TargetFrameworkVersion (latest SDK)
还值得考虑使用 Android 仪表板来了解有多少设备在运行特定版本的 Android.
It's also worthwhile to consider the Android Dashboard to understand how many devices are running a specific version of Android.
https://developer.android.com/about/dashboards
这篇关于如何在 Visual Studio 2019 中定位 Android 4.1?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!