如何使用 Gradle 創建發佈簽名的 apk 文件? - How to create a release signed apk file using Gradle?

問題:

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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章