[英]Ionic application targets API level 25 and must target at least API level 26
I am creating an android application using ionic 3, when i attempt to upload to playstore i get an error that my app targets api 25, when i check my project.property the value of target =android-26, same with my androidManifest.xml the value of targetSdkVersion = 26, how do i set the target again. 我正在使用Ionic 3创建一个android应用程序,当我尝试上传到Playstore时,当我检查我的project.property target = android-26的值时,我的应用程序以api 25为目标,与我的androidManifest.xml相同targetSdkVersion的值= 26,如何再次设置目标。 Below is my ionic info 以下是我的离子信息
Ionic: 离子性:
ionic (Ionic CLI) : 4.4.0 (C:\\Users\\IETECH\\AppData\\Roaming\\npm\\node_modules\\ionic) Ionic Framework : ionic-angular 3.9.2 @ionic/app-scripts : 3.1.8 ionic(Ionic CLI):4.4.0(C:\\ Users \\ IETECH \\ AppData \\ Roaming \\ npm \\ node_modules \\ ionic)Ionic框架:ionic-angular 3.9.2 @ ionic / app-scripts:3.1.8
Cordova: 科尔多瓦:
cordova (Cordova CLI) : not installed Cordova Platforms : not available Cordova Plugins : cordova-plugin-ionic-keyboard 2.0.5, cordova-plugin-ionic-webview 1.1.1, (and 8 other plugins) cordova(Cordova CLI):未安装Cordova平台:不可用Cordova插件:cordova-plugin-ionic-keyboard 2.0.5,cordova-plugin-ionic-webview 1.1.1(和其他8个插件)
System: 系统:
Android SDK Tools : 26.1.1 (C:\\Program Files (x86)\\Android\\android-sdk) NodeJS : v8.12.0 (C:\\Program Files\\nodejs\\node.exe) npm : 6.4.1 OS : Windows 10 Android SDK工具:26.1.1(C:\\ Program Files(x86)\\ Android \\ android-sdk)NodeJS:v8.12.0(C:\\ Program Files \\ nodejs \\ node.exe)npm:6.4.1 OS:Windows 10
Did you build using a specific android version? 您是否使用特定的Android版本进行构建? What versions have you installed to Android Studio? 您已将哪些版本安装到Android Studio? Maybe you built using a version provided automatically and somewhere in your config you had another version specified. 也许您使用自动提供的版本进行了构建,并且在配置中的某个位置指定了另一个版本。 Anyway cant answer with that information. 无论如何不能用该信息回答。 When you build the app you get no errors? 在构建应用程序时,您不会出现任何错误?
You need to install android platform 26, and then change android:targetSdkVersion="26"
in the <uses-sdk>
tag in platforms/android/AndroidManifest.xml
file in the Ionic 3 application folder. 您需要安装android平台26,然后在Ionic 3应用程序文件夹的platforms/android/AndroidManifest.xml
文件的<uses-sdk>
标签中的android:targetSdkVersion="26"
进行更改。
You should then be able to create a new release build and upload the app to Play Store successfully. 然后,您应该能够创建新的发行版并将应用程序成功上传到Play商店。
Alternatively, if you upgrade cordova to the latest version, a fresh cordova build will create the AndroidManifest.xml
file with android:targetSdkVersion="26"
. 另外,如果将cordova升级到最新版本,则新的cordova版本将使用android:targetSdkVersion="26"
创建AndroidManifest.xml
文件。
Open your config.xml in the root folder of the project and adjust version accordingly in the following section: 在项目的根文件夹中打开config.xml,并在以下部分中相应地调整版本:
<platform name="android">
<preference name="android-minSdkVersion" value="25" />
...
Basically update the value to what your min bar is. 基本上将值更新为最小值栏。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.