Android studio : Can not choose signature version

旧巷老猫 提交于 2019-12-04 12:44:41

问题


I want to build my app with V1 & V2 signature version. But both of them are greyed out. Can anyone please tell me how to make it avaiable to choose? [generate signature]


回答1:


As described in the official document,

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.

So be sure that the android studio and the gradle plugin of module(build.gradle->com.android.tools.build:gradle) are updated to 2.3 and above.




回答2:


Updating Android Studio and Gradle version worked for me.

Also check your build.gradle and configure it. More information here APK Signature Scheme v2




回答3:


Basically your Android studio is updated, but gradle plugin of module classpath 'com.android.tools.build:gradle' version is downgrade in build.gradle. So please update the version of gradle plugin like this:

dependencies{
     classpath 'com.android.tools.build:gradle:3.0.1'
 }

or above in build.gradle. and Sync the project. Thank you!!



来源:https://stackoverflow.com/questions/43525209/android-studio-can-not-choose-signature-version

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!