Search code examples
androidapk

Can't use Signature Scheme v1, v2 simultaneously


I'm trying to generate a signed apk from my project in Android Studio but APK Signature Scheme v1 doesn't seem to work when enabling both Signature Scheme v1 and v2, v1 seems to get invalidated, apksigner -verify -v returns:

Verifies
Verified using v1 scheme (JAR signing): false
Verified using v2 scheme (APK Signature Scheme v2): true
Verified using v3 scheme (APK Signature Scheme v3): false
Number of signers: 1

Using either v1 or v2 on their own is shown to validate. As far as I have read using both, however, is the best approach.


Solution

  • When I encounter this issue, it's due to not providing a low-enough minimum API level. You need at least Android 6 or lower (API level 23), I'm assuming you are using a minimum API level of 24 or greater. v1 jar signature schema will be false if you don't support API level 23 or lower.

    I ran into this supporting a 3rd party app store, not play store that required this.