我使用 android studio 生成 sign APK(build->generate sign APK)。 V1 和 V2 复选框都在签名版本中标记。 要通过 CI-CD 上传 APK,我正在运行 assemleRelease cmd。 问题是来自 assembleRelease 的符号不同(可能它只用 V1 签名)。 如何运行 assembleRelease 以使用与 android studio 相同的签名进行签名(build->generate sign APK)?
我的代码:
android {
signingConfigs {
release {
storeFile file('../config/xx.jks')
Properties props = new Properties()
props.load(new FileInputStream(file("../local.properties")))
storePassword "password"
keyAlias "my-alias"
keyPassword "password"
v2SigningEnabled true
}
debug {
storeFile file("../Config/xx.keystore")
}
}
最佳答案
我的错误,从工作室链接到另一个 keystore 文件的路径(不是“storeFile 文件('../config/xx.jks')”链接到..
关于Android 从 gradle 问题中签署 apk,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46079807/