How to create a Gradle file in Android Studio

A step by step guide on creating a Gradle file in Android Studio.

Oscar de la Hera Gomez
Written by Oscar de la Hera Gomez
First published on 06/07/2023 at 14:56
Last Updated on 06/07/2023 at 15:26
Three flowers that represent Kotlin, Android and Android Studio side by side. Beneath them sits the text “Create Gradle File.”

A step by step guide on creating a Gradle file in Android Studio.

SubscribeDownload Open Source Kotlin Starter Project

Step One: Create a new file

A screenshot of Android studio. Highlighted with a dot is the area where the gradle files are held.Right click in that area and select New > File.

In the Project inspector, right click any Gradle file and select New > File.

Step Two: Name the File

A screenshot of Android Studio showing you the window that appears when you attempt to create a new file. In the new file input we have put "sample.gradle." Enter your file name in this input and press the enter key to create a file with that name.

In the window that appears, enter the name of the gradle file (i.e. sample.gradle or sample.gradle.kts) and press enter.

It should create your file and open it, as shown below.

A screenshot of Android Studio showing the newly created "Sample.gradle" file.

Any Questions?

We are actively looking for feedback on how to improve this resource. Please send us a note to inquiries@delasign.com with any thoughts or feedback you may have.
SubscribeContact UsVisit our BlogView our ServicesView our Work

Partner with us

We would love to get to know you and see how we can help your organization with its goals and needs.
Let's Talk

Stay Informed

Get occasional updates about our company, research, and product launches.
Subscribe