Can't upload signed apk that targetSdkVersion is 30

Ofek Pintok picture Ofek Pintok · Aug 4, 2020 · Viewed 8.2k times · Source

I generated a signed apk with a target sdk version of 30. (Android 11). I know it wasn't officially released but my application is ready for the new changes. I am trying to upload it to the google play console but facing the 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.

What I tried to do:

  1. I double checked that I selected v2 (Full APK Singature) when I generated the apk.
  2. I tried to manually sign the apk using apksigner.

Nothing worked. I'm wondering if it's not working since the version wasn't released yet. However, I understand that it suppose to work from the documents.

Answer

bhaskar picture bhaskar · Aug 28, 2020

Select both V1 and V2(Full Apk Signature) while generating the apk. This solved my issue which was similar to yours.