Can the Android drawable directory contain subdirectories?

No, the resources mechanism doesn’t support subfolders in the drawable directory, so yes – you need to keep that hierarchy flat.

The directory layout you showed would result in none of the images being available.

From my own experiments it seems that having a subfolder with any items in it, within the res/drawable folder, will cause the resource compiler to fail — preventing the R.java file from being generated correctly.

Leave a Comment