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
password
./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.
1 Like
Ivbl95
November 1, 2021, 2:59pm
2
I have the same problem, how I can to sign my app with apksigner? Or what I need to do?
Ivbl95
November 2, 2021, 12:19pm
3
I built bundle instead apk and all is ok
ionic cordova build android --prod --release – – --packageType=bundle
1 Like
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
1 Like
You got this error as using jarsigner. For target sdk version above 30 use appsigner
for complete steps
///Ionic 7 Angular : How to generate, sign APK and Bundles for publishing to playstore console - YouTube