androidandroid-studio

Android studio - deploy the release apk instead of debug


The run configurations in Android Studio only let you deploy the default (debugging) APK, but I have built a release APK by running gradle assembleDebug from within Android Studio (as an external tool) and would like to deploy that instead. But it doesn't seem like you can change the APK which Android Studio installs. There is an option to deploy a custom artifact, but I'm not sure what that is, or if it would help, and anyway, there doesn't seem to be an option to create a new artifact in the Android Studio Project Structure dialog.

Does anyone know how I can specify the path of the APK which Android Studio deploys? I know I can install from the command line with adb, but it would speed things up if I could just click a button. Thanks.


Solution

  • On the left should be a "Build Variants" tab. There you can switch between your build types. If there no tabs visible than look left buttom for a monitor symbol and click it. Then you should find the build types. The selected one will be installed.