How to create a Gradle file in Android Studio

Oscar de la Hera Gomez
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.

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.
delasign logo

Book a Free Consultation.

An icon of an email.

Click here to email us.

Fill in the details below to book a free consultation or to let us know about something else. Whatever it is, we are here to help.

How can we help you ?

Contact Details