Below are the steps I follow for android app release.
- ionic cordova build android --prod --release
- jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore vfl-key.keystore app-release-unsigned.apk vfl
- ./zipalign -v 4 app-release-unsigned.apk vfl.apk
While uploading apk file on play store, I am getting this 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 31 requires a minimum of signature scheme v2; the APK is not signed with this or a later signature scheme.
I have the same problem, how I can to sign my app with apksigner? Or what I need to do?
I built bundle instead apk and all is ok
ionic cordova build android --prod --release – – --packageType=bundle
Did the issue get resolved?
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
Publishing Your Android or iOS App in Google Play & App Store - Ionic Framework