How to set my gradle for final release apk

前端 未结 2 1325
长发绾君心
长发绾君心 2020-12-30 09:27

Earlier my gradle was like this: WHICH IS OFCOURSE INCORRECT

    apply plugin: \'android\'

android {
    compileSdkVersion 19
    buildToo         


        
2条回答
  •  情书的邮戳
    2020-12-30 10:09

    The comment by pyus13 is what i would go by.

    It says in the documentation (http://developer.android.com/tools/publishing/app-signing.html) that:

    "Note: Including the passwords for your release key and keystore inside the build file is not a good security practice. Alternatively...have the build process prompt you for these passwords."

    So just do Build > Generate signed apk and Android studio will prompt you for the keystore/passwords and generate the apk in release mode. No need to put passwords in build file.

提交回复
热议问题