我有一个Ionic 4 Application。当我将版本apk上传到Play商店时,出现以下错误
您的应用当前以API级别23为目标,并且必须至少以API级别26为目标,以确保其基于针对安全性和性能进行了优化的最新API构建。将您应用的目标API级别更改为至少26。
这是在我的build.gradle
中buildscript {
repositories {
google()
jcenter()
}
dependencies {
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.android.tools.build:gradle:3.4.1'
}
}
allprojects {
repositories {
google()
jcenter()
}
//This replaces project.properties w.r.t. build settings
project.ext {
defaultBuildToolsVersion="28.0.3" //String
defaultMinSdkVersion=19 //Integer - Minimum requirement is Android 4.4
defaultTargetSdkVersion=28 //Integer - We ALWAYS target the latest by default
defaultCompileSdkVersion=28 //Integer - We ALWAYS compile with the latest by default
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
我已在config.xml中添加了这两行
<preference name="android-minSdkVersion" value="19" />
<preference name="android-targetSdkVersion" value="28" />
这是我的项目信息
离子:
ionic(Ionic CLI):4.12.0(C:\ Users \ amana \ AppData \ Roaming \ npm \ node_modules \ ionic)
离子框架:离子角3.9.2
@ ionic / app-scripts:3.2.3
科尔多瓦:
cordova(Cordova CLI):9.0.0(cordova-lib@9.0.1)
Cordova平台:不可用
Cordova插件:cordova-plugin-ionic-keyboard 2.1.3,cordova-plugin-ionic-webview 1.2.1(和其他14个插件)
系统:
Android SDK工具:26.1.1(C:\ Users \ amana \ AppData \ Local \ Android \ Sdk)
NodeJS:v8.11.1(C:\ Program Files \ nodejs \ node.exe)
npm:6.9.1-next.0
OS:Windows 10