0

In Android Studio I am trying to get a hierarchy file structure by declaring in build.gradle file.

   sourceSets{  
   main   {  
      res.srcDirs =      [  
         'src/main/res/mainfragment',
         'src/main/res'
      ]
   }
}

This does compile like it should. However in the project explorer it doesn't reflect this change. As in everything is flat. I have read in this answer that this is not normal behavior. Is this a bug?

edit: on request here a pictures This is how I want it to look The above is how i want it to look

This is how it looks currently This is how it looks currently This is how my folder structure looks like currenlty This is how my folder structure looks like currently.

Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
Mellester
  • 922
  • 7
  • 9

1 Answers1

0

You can't quite do what you want. You can have multiple resource folders, but each folder has to have the standard Android resource directory structure. You can't define your own hierarchies inside the res folder.

Scott Barta
  • 79,344
  • 24
  • 180
  • 163
  • I have a secondary android resource structure inside the folder compleet with things like drawable-hdpi – Mellester Dec 08 '14 at 17:45
  • Yes, there's a standard Android folder hierarchy to organize the resources by type and by other categories, but you can't impose your own non-Android structure on the resources. – Scott Barta Dec 08 '14 at 17:47
  • it was possible in prev version. question is this by design or a bug – Mellester Dec 08 '14 at 17:59