Android Gradle APK Build in Android Studio

Subscribe To My Channel and Get More Great Tutorials

Ask me A Question

The build process of Android projects is handled by the Gradle build system. Android projects come in two flavors, the first set of projects uses the legacy project structure used by the Ausencia ADT tooling which was used until 2013, the second set of project uses the new Gradle build structure.

If you create a new project in Android studio, the Gradle build scripts are automatically created. Android studio wraps the Gradle runtime hence no additional installation is required.

Android uses by default two build types: debug and release which can be configured differently in the build.gradle file.

The Gradle build system is also able to manage different variants of building an some cases you might want to split up your app into different variants and it is great that this can be done by the Gradle build itself. for instance you can define different build variants for certain device categories, like or tablet. Another use case might be a paid or a free version of your app.

In this example, we will show you the different Gradle commands and create an Android application with two different project flavors, called free and paid. The free version defines different resources than the paid version. To have a simple exercise you only replace a string in free version.

The source code is available at

Stay connected to Indragni Soft Solutions:

Android Gradle APK Build in Android Studio

Processing your request, Please wait....