80

Android Studio has changed its project structure yet again... now it is

project └── app-module ├── manifests ├── res └── java 

I've been looking everywhere online, but I can't find where to put the assets folder. When I try to create the folder via the directory viewer in Android Studio (right-click, New... directory) the "directory" option is not available. The only available options are:

Java Class File Module Package Image Asset 

None of which will do what I want here.

Has anyone figured this out?

1

5 Answers 5

189

An image of how to in Android Studio 1.5.1.

Within the "Android" project (see the drop-down in the topleft of my image), Right-click on the app...

enter image description here

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for this. I wasted about 10 minutes clicking everywhere looking for this
Thanks a lot!! Picture is indeed worth a thousand words :)
104

You can click on the Project window, press Alt-Insert, and select Folder->Assets Folder. Android Studio will add it automatically to the correct location.

You are most likely looking at your Project with the new(ish) "Android View". Note that this is a view and not the actual folder structure on disk (which hasn't changed since the introduction of Gradle as the new build tool). You can switch to the old "Project View" by clicking on the word "Android" at the top of the Project window and selecting "Project".

3 Comments

You can also do this in the "Android view": right click on the name of the module where you want the assets folder and navigate to New -> Folder -> Assets Folder.
I tried to create assets folder manually didn't work, had to follow above procedure :D Thanks
Thank you this is very simple and straight forward way doing
16

According to new Gradle based build system. We have to put assets under main folder.

Or simply right click on your project and create it like

File > New > folder > assets Folder

3 Comments

I haven't noticed any restriction in regards to where you can place an assets folder. Is the src/main/assets a special case?
your asset folder must be under src/main/
Consider my answer below, I'm adding an asset folder directory which does not reside in src/main/. It works
6

To specify any additional asset folder I've used this with my Gradle. This adds moreAssets, a folder in the project root, to the assets.

android { sourceSets { main.assets.srcDirs += '../moreAssets' } } 

Comments

3

right click on app-->select

New-->Select Folder-->then click on Assets Folder

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.