英文:
Android api level requirement is minsdkversion 29 allowed
问题
以下是您要的部分翻译:
"Starting in January 2023, app updates must target Android 12"
"从2023年1月开始,应用程序更新必须以Android 12为目标"
"Am I correct in thinking that because I have "targetSdkVersion=33" I will be fine?"
"我是否正确地认为,因为我有"targetSdkVersion=33",所以没问题?"
"What role that minSDKVersion have in relation if is accepted by google?"
"如果被Google接受,minSDKVersion有什么作用?"
"Should minSDKVersion be 31 or I am allowed to put there 29?"
"minSDKVersion应该是31,还是我可以将其设置为29?"
英文:
Can someone clarify this for me. In the android manifest file I have
uses-sdk android:minSdkVersion="29" android:targetSdkVersion="33"
Reading the google documentation https://developer.android.com/google/play/requirements/target-sdk
What is not clear to me is
Starting in January 2023, app updates must target Android 12
Am I correct in thinking that because I have "targetSdkVersion=33" I will be fine?
What role that minSDKVersion have in relation if is accepted by google? Should minSDKVersion be 31 or I am allowed to put there 29?
Hope makes sense
答案1
得分: 2
是的,您的 targetSdkVersion
设置是正确的:
新应用程序必须以 Android 12 (API 级别 31) 或更高版本为目标
minSdkVersion
不受此影响。该属性定义了您的应用程序要支持多少旧版本。如果您还针对较旧的版本进行目标开发,您的潜在用户群将更大,但您可能需要额外的工作来维护向后兼容性。
您可以在 apilevels.com 上看到所有设备上的 API 级别的累积使用情况的粗略估计。使用 minSdkVersion=29
,您的应用程序支持约 77.7% 的所有 Android 设备:
此截图中的累积使用分布数据截至 2023 年 2 月 7 日。
英文:
Yes, you'll be fine with your targetSdkVersion
:
> New apps must target Android 12 (API level 31) or higher
The minSdkVersion
is unaffected by this. This property defines how many older versions you want to support in your app. Your potential user base is much higher if you target older versions as well, but you'll may have to spend additional effort on maintaining backward compatibility.
A rough estimate of the cumulative usage of the API levels across all devices can be seen on apilevels.com. With minSdkVersion=29
, your app supports about 77.7% of all Android devices:
Cumulative usage distribution figures in this screenshot are of February 7, 2023
答案2
得分: 1
首先,你的应用将被Google Play商店接受,因为你的目标SDK版本高于API 31。至于minSDKVersion,官方文档的解释如下:
一个整数,表示应用程序运行所需的最低API级别。如果系统的API级别低于此属性中指定的值,Android系统将阻止用户安装该应用程序。你应该始终声明此属性。
Google没有对此属性提出要求。而Android官方文档说:
如果不声明此属性,系统将假定默认值为"1",表示你的应用与所有Android版本兼容。
因此,如果你的应用与较低版本兼容,比如可以在Android 10或更低版本上正常运行,你可以将其设置为29。
要获取更多信息,你可以查看有关uses-sdk属性的官方文档。
英文:
First of all, your app will be accpeted by the Goolge Play Store because your target sdk is heigher than Api 31. And then about the minSDKVersion, the official document's explain:
> An integer designating the minimum API Level required for the application to run. The Android system will prevent the user from installing the application if the system's API Level is lower than the value specified in this attribute. You should always declare this attribute.
Google doesn't have a request for this attribute. And the android official document said:
> If you do not declare this attribute, the system assumes a default value of "1", which indicates that your application is compatible with all versions of Android.
So if your application is compatible with the lower versions, such as it can run well on the Android 10 or lower, you can set it as 29.
For more information, you can check the official document about the uses-sdk attributes.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论