简体   繁体   English

Android PlayStore 警告您的应用当前针对 API 级别 25

[英]Android PlayStore warning your app currently targets API level 25

Warnings Your app currently targets API level 25 and must target at least API level 26 to ensure it is built on the latest APIs optimized for security and performance.警告 您的应用目前以 API 25 级为目标,并且必须至少以 API 26 级为目标,以确保它建立在针对安全性和性能优化的最新 API 之上。

From August 2018, new apps must target at least Android 8.0 (API level 26).从 2018 年 8 月开始,新应用程序必须至少以 Android 8.0(API 级别 26)为目标。 From November 2018, app updates must target Android 8.0 (API level 26).从 2018 年 11 月开始,应用更新必须以 Android 8.0(API 级别 26)为目标。

Tip: Change your app's target API level.提示:更改应用的目标 API 级别。 Learn how.学习如何。

I am using Cordova and Ionic 3. Just built the app using: ionic cordova build android --release-prod我正在使用 Cordova 和 Ionic 3。刚刚构建的应用程序使用: ionic cordova build android --release-prod

What should I do, ignore this or fix and how?我该怎么办,忽略这个或修复以及如何修复?

Thanks.谢谢。

You can update your cordova-android to 7.0.0 as that's the version that uses SDK 26 as target, or you can update to cordova-android 7.1.4, as it targets SDK 27.您可以将您的 cordova-android 更新到 7.0.0,因为这是使用 SDK 26 作为目标的版本,或者您可以更新到 cordova-android 7.1.4,因为它以 SDK 27 为目标。

You can do it by removing the platform and adding it again specifying the version to use like this: (if not using ionic, remove the ionic word from both commands)您可以通过删除平台并再次添加它来指定要使用的版本,如下所示:(如果不使用 ionic,请从两个命令中删除 ionic 词)

ionic cordova platform rm android
ionic cordova platform add android@7.1.4

If you don't want or can't update, you can try to set the target SDK with this preference in the config.xml如果您不想或无法更新,您可以尝试在 config.xml 中使用此首选项设置目标 SDK

<preference name="android-targetSdkVersion" value="26"/>

And then run ionic cordova prepare然后运行ionic cordova prepare

In Flutter : I have also get a similar error in Flutter project * 'Your app currently targets API level 28 and must target at least API level 29 to ensure that it is built on the latest APIs optimised for security and performance.在 Flutter 中:我在Flutter project也遇到了类似的错误 *“您的应用程序当前面向 API 级别 28,并且必须至少面向 API 级别 29,以确保它构建在针对安全性和性能进行了优化的最新 API 上。 Change your app's target API level to at least 29 flutter'*将您应用的目标 API 级别更改为至少 29 flutter'*

So I tried to know what and why this error is occur for, So i got this solution所以我试图知道发生这个错误的原因和原因,所以我得到了这个解决方案

Is it need to change both compileSdkVersion and targetSdkVersion to 29 , Follow the below step to change是否需要将compileSdkVersiontargetSdkVersioncompileSdkVersion 29 ,按照下面的步骤改

  1. Go to Your_Project_Directory/android/app/build.gradle and change your target into:转到Your_Project_Directory/android/app/build.gradle并将您的目标更改为:

     compileSdkVersion 29 targetSdkVersion 29

在此处输入图片说明

This is because Google has made it compulsory for apps to target at least 26 API level by August 2018 for new apps and November 2018 for updating apps.这是因为谷歌强制要求应用程序在 2018 年 8 月之前针对新应用程序和 2018 年 11 月针对更新应用程序至少针对 26 个 API 级别。

Docs here. 文档在这里。

You can do it by removing the platform and adding it again specifying the version to use like this: (if not using ionic, remove the ionic word from both commands)您可以通过删除平台并再次添加它来指定要使用的版本,如下所示:(如果不使用 ionic,请从两个命令中删除 ionic 词)

ionic cordova platform rm android ionic cordova platform add android@7.1.4 If you don't want or can't update, you can try to set the target SDK with this preference in the config.xml ionic cordova platform rm android ionic cordova platform add android@7.1.4 如果你不想或者不能更新,可以尝试在config.xml中用这个preference设置target SDK

And then run ionic cordova prepare 然后运行 ​​ionic cordova prepare

This worked for me!这对我有用!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 您的应用当前针对 API 级别 30,并且必须至少针对 API 级别 31 - Your app currently targets API level 30 and must target at least API level 31 无法将 Cordova 应用程序提交到 Play 商店 - (您的应用程序当前针对 API 级别 30,并且必须至少针对 API 级别 31) - Can't submit Cordova app to the Play Store - (Your app currently targets API level 30 and must target at least API level 31) 您的应用目前以 API 级别 30 为目标,并且必须至少以 API 级别 31 为目标,以确保它是基于最新的 API 构建的 - Your app currently targets API level 30 and must target at least API level 31 to ensure it is built on the latest APIs 将 android 应用程序包上传到 Playstore 时出错。您的应用程序包针对无法识别的语言 jp - Getting error while uploading android app bundle to playstore.. Your app bundle targets unrecognized language jp 您的应用正在使用易受跨应用脚本攻击的 WebView Android PlayStore 警告 - Your app(s) are using a WebView that is vulnerable to cross-app scripting Android PlayStore Warning 离子应用程序以API级别25为目标,并且必须至少以API级别26为目标 - Ionic application targets API level 25 and must target at least API level 26 Broadcastreceiver无法在android Nougat API 25级中工作吗? - Broadcastreceiver not working in android Nougat api level 25? 您可以通过 api 在 Playstore 上更新您的应用吗 - Can you update your app on playstore through an api 如何在Android应用程序中分配超过25MB,api等级8? - How to allocate more than 25MB in an android app, api level 8? 在Playstore Android上更新应用时,设备支持已删除警告 - Device support removed warning coming when updating app on playstore Android
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM