更新时间:2023-09-27 09:52:04
这个解决方法对我有用,不需要 -Dorg.gradle.model.dsl=true
This workaround works for me and does not require -Dorg.gradle.model.dsl=true
model {
def signConf
android.buildTypes {
release {
signingConfig = signConf
}
}
android.signingConfigs {
create("signed") {
keyAlias = "meow"
keyPassword = "**"
storeFile = file("meow-key.keystore")
storePassword = "**"
storeType = "jks"
signConf = it
}
}
}
但是,它仅在您只有一个签名配置时才有效.
However, it only works if you only have one signingConfig.