Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create ionic 3 app with Target SDK version 30 getting error in google play console

I am create my app in ionic v3 with Target SDK version 30 when i am upload my apk on google play console i am getting error "You uploaded an APK with an invalid signature (learn more about signing). Error from apksigner: ERROR: MIN_SIG_SCHEME_FOR_TARGET_SDK_NOT_MET: Target SDK version 30 requires a minimum of signature scheme v2; the APK is not signed with this or a later signature scheme"

When i am making apk with Target SDK version 29 and upload on google play console its upload without any error

i don't no whay google give me an error

create sign in apk proccess are same in Target SDK version 30 or Target SDK version 29 same keystore and all command are same for create sign apk

My command are ionic cordova build --release android

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore myappname.keystore app-release-unsigned.apk myapp

zipalign -v 4 app-release-unsigned.apk myappname.apk

Please Check what is wrong on about command and let me know it's argent my client are waiting a Target SDK version 30

like image 287
Bhagirath Gadhesariya Avatar asked Mar 24 '21 06:03

Bhagirath Gadhesariya


People also ask

Can I launch an ionic app on an Android device?

Ionic apps can also be launched to a device. We don't recommend using Android Studio for developing Ionic apps. Instead, it should only really be used to build and run your apps for the native Android platform and to manage the Android SDK and virtual devices. Download Android Studio from the Android website.

How do I create a release build in ionic?

To generate a release build for Android, run the following cli command: This will generate a release build based on the settings in the config.xml in the platforms/android/app/build/outputs/apk directory of an app. An Ionic app will have preset default values in this file but this can be changed to customize builds.

What API level should I target for Android app updates?

Target API level 30 (Android 11) or above and adjust for behavioral changes; except Wear OS apps, which must continue to target API level 28 or higher. Starting in November 2021, app updates will be required to target API level 30 or above and adjust for behavioral changes in Android 11.

Will there be a target SDK version for Android 11?

Nevertheless a default target SDK bump needs to happen in a major version (i.e., cordova-android@10) and given that we've just release v9 this is not likely to happen any time soon and rather around the general release of Android 11. But yes, we are aware of this new SDK version and Android 11 being in development.


2 Answers

After build for release -> jarsigner -> zipalign, I just need these scripts. To sign the apk with APK Signature Scheme v2:

apksigner sign --ks yourkeystore.keystore yourapk.apk

To verify the signing

apksigner verify -v yourapk.apk
like image 105
diazwijaya Avatar answered Oct 23 '22 02:10

diazwijaya


Solution

i am use this solution for ionic app only using cmd

After zipalign command success apply this command for conver sign apk with signature scheme v2

apksigner sign --v2-signing-enabled false --ks keystore name.keystore signapkname.apk

apksigner sign --ks keystore name.keystore signapkname.apk

apksigner sign --ks keystore name.keystore --ks-key-alias aliasname signapkname.apk

keytool -printcert -jarfile signapkname.apk

apksigner verify -v --print-certs signapkname.apk

apksigner verify -v signapkname.apk

like image 45
Bhagirath Gadhesariya Avatar answered Oct 23 '22 01:10

Bhagirath Gadhesariya