I used to publish an ionic app on google play but this morning I had the following warning: "Your application targets now level API 26. Nevertheless, it should now target level API 28 ..."
I'm using Cordova 6.3.0, how can I target API 28 with it?
Here is my ionic info :
Ionic:
ionic (Ionic CLI) : 4.12.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.4
Cordova:
cordova (Cordova CLI) : 9.0.0 ([email protected])
Cordova Platforms : android 6.3.0, ios 5.0.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 1.2.1, (and 14 other plugins)
System:
NodeJS : v10.16.0 (/usr/local/bin/node)
npm : 6.9.0
OS : macOS Mojave
Xcode : Xcode 10.2.1 Build version
I have no error message when building my app locally like I did until now, the warning is only on google play platform.
Here are the command line I generally use :
npm i
cordova platform rm android
ionic cordova platform add [email protected] --save-exact
ionic cordova build android --prod --release
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore somekeystorye.keystore /Users/user/Documents/dev/app/platforms/android/build/outputs/apk/android-release-unsigned.apk Name
~/Library/Android/sdk/build-tools/29.0.1/zipalign -v 4 /Users/user/Documents/dev/app/platforms/android/build/outputs/apk/android-release-unsigned.apk /Users/user/Documents/dev/app/platforms/android/build/outputs/apk/android-release-0.0.20.apk
Any idea?
EDIT Is seems that :
<preference name="android-targetSdkVersion" value="28" />
Does the job as mentioned here : Can cordova [email protected] target SDK 26? I have no warnings now.
Will try to check and come back later to keep you in touch
Cordova Android is an Android application library that allows for Cordova-based projects to be built for the Android Platform. Cordova based applications are, at the core, applications written with web technology: HTML, CSS and JavaScript. Apache Cordova is a project of The Apache Software Foundation (ASF).
After spend some time on this error i found this three solution.
ionic cordova platform rm android
ionic cordova platform add [email protected]
<preference name="android-targetSdkVersion" value="28" />
for me what works finaly was just this :
<preference name="android-targetSdkVersion" value="28" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With