无法设置targetSdkVersion为29。

huangapple go评论62阅读模式
英文:

Can't set targetSdkVersion = 29

问题

我正在开发一个Android应用程序,它使用一个本地库,而本地库仅支持targetSDKVersion = 29。我创建了一个新的Android项目,其默认targetSDKVersion = 31,我尝试将targetSDKVersion设置为29,但我收到了以下图像中的错误消息:

无法设置targetSdkVersion为29。

我有另一个Android项目,它的targetSDKVersion = 29,没有错误消息,我不知道为什么我无法为第一个项目将targetSDKVersion设置为29。

无法设置targetSdkVersion为29。

如何将targetSDKVersion设置为29?

英文:

I am developing an Android application which use a native library and native library supports targetSDKVersion = 29 only. I created a new Android project has default targetSDKVersion =31, I tried to set targetSDKVersion as 29, but I got the error messsage as below image:

无法设置targetSdkVersion为29。

I have another Android project it has targetSDKVersion = 29 without error message, I don't know why I can't set targetSDKVersion = 29 for the first project.

无法设置targetSdkVersion为29。

How can I set targetSDKVersion as 29?

答案1

得分: 0

targetSdkVersion声明之前,您可以通过添加以下内容来抑制错误:

noinspection ExpiredTargetSdkVersion

请参阅Google Play应用程序的目标API级别要求

为了帮助简化过渡,我们将应用程序可发现性的强制执行截止日期从2022年11月1日延迟至2023年1月31日。如果您需要更多时间来将您的应用程序更新至目标API级别31或更高版本,您可以通过提交应用程序的扩展请求来继续让您的应用程序对所有Google Play用户可见,直到2023年5月1日。请检查您的Play控制台收件箱消息,以获取每个应用程序的扩展表单链接。

英文:

You can suppressing the error by adding the following before targetSdkVersion declaration :

noinspection ExpiredTargetSdkVersion

See Target API level requirements for Google Play apps:

> To help ease the transition, we are delaying the enforcement deadline for app discoverability from November 1, 2022 to January 31, 2023. You can continue to request an extension if you need more time to update your app to target API level 31 or above by submitting an extension request for your app to continue being discoverable to all Google Play users until May 1, 2023. Check your Play Console Inbox Messages for links to each of your app’s extension forms.

huangapple
  • 本文由 发表于 2023年3月12日 17:08:19
  • 转载请务必保留本文链接:https://go.coder-hub.com/75712078.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定