問題:
I would like to have my Gradle build to create a release signed apk file using Gradle.我想讓我的 Gradle 構建使用 Gradle 創建一個發佈簽名的 apk 文件。
I'm not sure if the code is correct or if I'm missing a parameter when doing gradle build
?我不確定代碼是否正確,或者在執行gradle build
時是否缺少參數?
This is some of the code in my gradle file:這是我的 gradle 文件中的一些代碼:
android {
...
signingConfigs {
release {
storeFile file("release.keystore")
storePassword "******"
keyAlias "******"
keyPassword "******"
}
}
}
The gradle build finishes SUCCESSFUL, and in my build/apk
folder I only see the ...-release-unsigned.apk
and ...-debug-unaligned.apk
files. gradle 構建成功完成,在我的build/apk
文件夾中,我只看到...-release-unsigned.apk
和...-debug-unaligned.apk
文件。
Any suggestions on how to solve this?有關如何解決此問題的任何建議?
解決方案:
參考一: https://en.stackoom.com/question/1Eu8g參考二: https://stackoom.com/question/1Eu8g