Running custom Gradle Android build in Android Studio

Is there an easy way to build, install, and automatically run a custom Gradle build in Android Studio?

Build android project android studio

When I click the β€œPlay” button in Android Studio (with the usual configuration of the Android project), my project builds, installs it on the desired device, and launches the application.

gradle configuration android studio

How can I do this using specific Build / Product properties (using Gradle)? I got to the point of creating a Gradle configuration that runs the "installFlavor1" task. This installs correctly, but does not start the application automatically.

+14
android android-studio gradle
Oct 22 '13 at 22:31
source share
1 answer

You can always choose another buildVariant from the buildVariant window in Android Studio. And then, if you press the start / play button, you can install and run the application on your device / emulator.

build options

And also for me, running gradlew install** on the terminal does not start the application. If you are looking for something, look at build.gradle and buildhelper.gradle here

+48
Oct 25 '13 at 18:22
source share



All Articles