Android Studio Tutorials

100+ tutorials, explanation videos, and examples to help you develop creative and technical skills.

What is the use of gradle.build file in Android Studio?

Build is a process of packaging the resource files, source code files into an APK file or App Bundle file. the gradle.build file contains basic information about the app (like package id, app version, etc.) and libraries used to build an android application.

build.gradle file is automatically created by Android Studio. This file looks like below.

1. We can add plugins here to use another features of Google like Firebase, Google Maps etc.

2. Here, we specify the version of the SDK by using we are gonna compile our APK. Make sure you are using the latest version of the SDK.

3. This is a unique id for our android application to uniquely identify our app on the PlayStore. All the applications on the play store have unique application id.

4. Defines the minimum API level to run the application. For example, if minSdkVersion is 19(KitKat), that means users won't be able to use your app below 19(KitKat) version.

5. Specifies the API level used to run the application.

6. Defines the version number(string) and version code(int) of the application. It will show on the PlayStore.

7. Used for Android Studio's testing purpose. Keep this line as it is.

8. If minifyEnabled is true then it will secure our source code with the pro-guard rule file of Android Studio. So hackers won't be able to understand our flow of code and logic.

8. If minifyEnabled is true then it will secure our source code with pro-guard rule file of Android Studio. So hackers won't be able to understand our flow of code and logics.

9. Java version used to compile class files.

10. Dependencies are the main part of an Android Studio project. It allows us to use third-party libraries and SDKs.

If you have any Questions or Queries
You can mail us at info.learnoset@gmail.com

Follow us to learn Coding and get in touch with new Technologies.