How to add a JSON file to an Android Studio project

Oscar de la Hera Gomez
Two flowers that represent Kotlin and Android Studio side by side. Beneath them sits the text "Create JSON file."

A step by step guide on creating a JSON that can be read and processed by an app in Android Studio.

Step One: Create an Assets Folder

A screenshot of Android Studio showing you how to create an Assets folder.

In the Project Inspector, right click the app folder and select New > Folder > Asset Folder.

If you already have an assets folder, skip this step.

A screenshot of Android Studio showing the pop up that appears when you attempt to create a new Assets folder. Highlighted is the Finish on the bottom right, click it and continue the tutorial.

Click Finish.

Step Two: Create the JSON file

A screenshot of Android Studio showing the Assets folder right clicked with the menu that appears next to it. Highlighted is New > File. Click File and continue to the next step.

Right click on the Assets folder and select New > File.

A screenshot of the pop up that appears in Android Studio when you create a new file. Highlighted is the area where you enter the name. We have written sample.json. Write the name of the file that you wish and press enter to create the file.

Write the name of your file (i.e. sample.json) in the pop up and press Enter.

Looking to learn how to read the JSON in Kotlin or convert the JSON to usable data?

Follow the relevant tutorial below to learn how to consume and use JSON data in Kotlin and Android Studio.

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