How to set up gradle and android studio to do release build?
open the Build Variants pane, typically found along the lower left side of the window: set debug to release shift+f10 run!! then, Android Studio will execute assembleRelease task and install xx-release.apk to your device.