Check out the official docs – Build your app from the commandline. You can use gradle commands depending on which variant you want . For example, ./gradlew installDebug will make a debug apk and load it onto a connected device (though it won’t open it like Android Studio does).