首先是我的signinConfigs:
signingConfigs {
development {
storeFile file("mykey.jks") //Path to the keystore file
keyAlias "mykey"
storePassword "mykeydev"
keyPassword "mykeydev"
}
production {
storeFile file("mykey.jks") //Path to the keystore file
keyAlias "mykey"
storePassword "mykeyprod"
keyPassword "mykeyprod"
}
}
现在我的口味:
productFlavors {
development{
applicationId "br.com.myapp.dev"
signingConfig signingConfigs.development
resValue "string", "app_name", "DEV"
}
production {
applicationId "br.com.myapp"
signingConfig signingConfigs.production
resValue "string", "app_name", "PROD"
}
}
我有buildTypes
这个:
buildTypes {
release {
minifyEnabled false
productFlavors.production.signingConfig signingConfigs.production
productFlavors.development.signingConfig signingConfigs.development
}
}
我的问题是,如果所有密钥和东西都在我的 .gradle 文件中,为什么每次我想生成一个新的签名 apk 文件时都要求我输入 keyPassword 和 storePassword?