Reputation: 127
I am trying to upload a new build for Ionic 3 app. Now the Google Play Store is asking me to target minSDK 30 which is have done. But now the Google Play Store is returning message:
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.
I tried to sign using apksigner but whenever I run the command I get error as Atleast one signer must be specified.
I did the following steps;
ionic cordova build android --prod --release
keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore HelloWorld-release-unsigned.apk alias_name
zipalign -v -p 4 HelloWorld-release-unsigned.apk HelloWorld.apk
apksigner sign --ks my-release-key.keystore HelloWorld.apk
I can use the zip align but cannot sign using apksigner. Please help
Upvotes: 2
Views: 1794
Reputation: 51
I am using this as a quick fix hack after the zipalign step is done :
zipalign -v 4 HelloWorld-release-unsigned.apk HelloWorld.apk
I have followed this extra step:
apksigner sign --ks app.keystore --v1-signing-enabled true --v2-signing-enabled true HelloWorld.apk
Please note : use the same password you used for the keystore file. So now you can upload your .apk file or .aab file to play store
https://ionicframework.com/docs/v1/guide/publishing.html
Upvotes: 0
Reputation: 3126
Generate an App Bundle instead of an APK:
ionic cordova build android --prod --release -- -- --packageType=bundle
And then sign in with .jks
jarsigner -sigalg SHA256withRSA -digestalg SHA-256 -keystore app.jks AppName.aab AppName
or .keystore
jarsigner -sigalg SHA256withRSA -digestalg SHA-256 -keystore app.keystore AppName.aab AppName
Upvotes: 2