You uploaded an APK with an invalid signature. 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

Below are the steps I follow for android app release.

  1. ionic cordova build android --prod --release
  2. jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore vfl-key.keystore app-release-unsigned.apk vfl
  3. password
  4. ./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

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