Android Raw folders - creation and reference

Katana24 picture Katana24 · Apr 25, 2011 · Viewed 97k times · Source

I'm trying to create a raw folder for my android app which will hold different media files for use later. But I can't seem to be able to reference the created raw folder in my .java classes.

For example: R.? -> This returns a list of all possible resources I can use like the basic drawable, layout and values folder. However it won't display the raw folder.

Is it correct to say that raw is created as a general folder and nothing else? Or does it have to be declared in the AndroidManifest.xml file in order to be recognised as a resource?

Answer

Leandroid picture Leandroid · Apr 12, 2012

The raw folder must be inside the res folder, otherwise it won't work.