androidandroid-studioapksign

How can I sign my app with "APK Signature Scheme v3 and v4"?


Here in the docs, there is the explanation about signature v3 and v4 : https://source.android.com/security/apksigning/v3

But when I try to sign my app in android studio using Build>Generate signed apk/bundle, I can just check checkboxes for v1(jar signature) and v2(full apk signature) and there is no option for v3 signature.

How can I sign my App using signature scheme v3 and v4?

Thank you.


Solution

  • As of today, Android Studio supprot v3 and v 4 with Android Gradle Plugin 4.2 To enable one or both of these formats in your build, add the following properties to your module-level build.gradle or build.gradle.kts file:

    android {
       ...
       signingConfigs {
          config {
              ...
              enableV3Signing = true
              enableV4Signing = true
          }
       }
    }