save keystore password in android studio 3

自闭症网瘾萝莉.ら 提交于 2021-02-05 12:58:54

问题


in android studio 2 you can save key store password and key password but in android studio 3 you can just save key password and you have to write key store password every time you want to build apk is there a settings or way to save key store password in android studio 3?
I Know I can save the password in my build.gradle file but I don't want to password be saved on git.


回答1:


I am having the same issue. But you can add your signing configs this way so they won't be checked into version control:

Put this into ~/.gradle/gradle.properties

RELEASE_STORE_FILE={path to your keystore}
RELEASE_STORE_PASSWORD=*****
RELEASE_KEY_ALIAS=*****
RELEASE_KEY_PASSWORD=*****

Modify your build.gradle like this:

...    
signingConfigs {

   release {
       storeFile file(RELEASE_STORE_FILE)
       storePassword RELEASE_STORE_PASSWORD
       keyAlias RELEASE_KEY_ALIAS
       keyPassword RELEASE_KEY_PASSWORD
   }
}

buildTypes {
        release {
            signingConfig signingConfigs.release
        }
}

Source: How to create a release signed apk file using Gradle?




回答2:


It seems to be a bug.

On Mac you can fix this by manually adding a Keychain Access entry:



来源:https://stackoverflow.com/questions/47109799/save-keystore-password-in-android-studio-3

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