Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23803] Android N: Use APK Signature Scheme v2 for creating APK's

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionDuplicate
Resolution Date2017-03-20T21:08:13.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsandroid, android-7, androidlib, apk
ReporterHans Knöchel
AssigneeEric Merriman
Created2016-08-22T21:24:27.000+0000
Updated2017-03-21T22:56:22.000+0000

Description

Android N offers a new way to create APK's: {quote} Android 7.0 introduces APK Signature Scheme v2, a new app-signing scheme that offers faster app install times and more protection against unauthorized alterations to APK files. By default, Android Studio 2.2 and the Android Plugin for Gradle 2.2 sign your app using both APK Signature Scheme v2 and the traditional signing scheme, which uses JAR signing. Although we recommend applying APK Signature Scheme v2 to your app, this new scheme is not mandatory. If your app doesn't build properly when using APK Signature Scheme v2, you can disable the new scheme. The disabling process causes Android Studio 2.2 and the Android Plugin for Gradle 2.2 to sign your app using only the traditional signing scheme. To sign with only the traditional scheme, open the module-level build.gradle file, then add the line v2SigningEnabled false to your release signing configuration: {quote}
 android {
    ...
    defaultConfig { ... }
    signingConfigs {
      release {
        storeFile file("myreleasekey.keystore")
        storePassword "password"
        keyAlias "MyReleaseKey"
        keyPassword "password"
        v2SigningEnabled false
      }
    }
  }
{quote} Caution: If you sign your app using APK Signature Scheme v2 and make further changes to the app, the app's signature is invalidated. For this reason, use tools such as zipalign before signing your app using APK Signature Scheme v2, not after. {quote} More info: https://developer.android.com/about/versions/nougat/android-7.0.html#apk_signature_v2

Comments

  1. Frankie Merzadyan 2017-03-20

  2. Lee Morris 2017-03-21

    Closing ticket as duplicate with reference to the above comment.

JSON Source