Android-MinSdkVersion被确认为TargetSdkVersion

时间:2018-12-14 11:37:50

标签: android cordova

自2018年11月以来,Google希望所有应用程序和该应用程序的更新至少要针对Android 8.0(API级别26)https://developer.android.com/distribute/best-practices/develop/target-sdk

当前,我正在使用Cordova 8.1.2开发应用程序,并且build.gradle设置如下:

project.ext {
  defaultBuildToolsVersion="27.0.1" //String
  defaultMinSdkVersion=21 //Integer - Minimum requirement is Android 5.0
  defaultTargetSdkVersion=28 //Integer - We ALWAYS target the latest by default
  defaultCompileSdkVersion=28 //Integer - We ALWAYS compile with the latest by default
}

一切正常,但是当我将.apk文件上传到Play商店时,出现以下错误:

Your app is currently targeting API level 21 and must target at least API level 26 to ensure the app is based on the latest APIs that are optimized for security and performance. Change the target API level of your app to at least 26. More information: https://developer.android.com/distribute/best-practices/develop/target-sdk.

我不想升级到API级别26,因为许多当前用户将不再获得任何更新。那我该怎么办?

提前谢谢!

0 个答案:

没有答案