10

I have version 1.5.1 of Android studio. Apparently this never version doesn't have an asset folder for txt files. How are you suppose to includes these files into you project? And how to further use the within you application? Thanks for your advice

2 Answers2

8

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

And then you can add your assets or/txt files(whatever you want) on it.

ʍѳђઽ૯ท
  • 16,646
  • 7
  • 53
  • 108
3

You can go to New->add folder -> assets folder and the folder will automatically be put in the right place.
Please reference the following where I got this answer -- it also includes a screenshot: Adding an assets folder in Android Studio

To access something from the assets folder in your application you need to use the AssetManager:

Please refer to the following for a full example:

How to access file under assets folder?

Community
  • 1
  • 1
Alan S.
  • 156
  • 1
  • 1
  • 4