How to set my gradle for final release apk

我是研究僧i 提交于 2019-11-30 07:06:53

On the lower left of the Studio window there's a docked view called "Build Variants".

Open it and choose the release variant.

ps. you are adding compile 'com.google.android.gms:play-services:+' twice.

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!