I use Android Studio to do android stuff. There is a "Build Variants" panel, in which I can switch between debug and release variants. If release variant is selected, then in "Build" menu there is a "Generate Signed APK..." option. It will basically run the command you wrote, but before that I have to set my signatures (in this case I use my existing one).