davebren / ResourceNestingExample

This is a demo app for android that shows how to create nested resource directories using the gradle build system.
251 stars 38 forks source link

Cannot worked in Gradle 2.2.1 #2

Closed johnwatsondev closed 9 years ago

johnwatsondev commented 9 years ago
qq20150718-1 qq20150718-2

As you see the SNAPSHOT in my project it cannot identify the layout sub folder any more!

davebren commented 9 years ago

The layout file still needs its direct parent to be a layout folder. Here, the 'activity' folder is being treated as a resource folder (see how the folder icon changed). Try declaring a res folder 'src/main/res/activity' and then add a layout folder, and then add the layout file to that.

johnwatsondev commented 9 years ago

@eskimoapps YES. It worked. Thanks for your patient help!

qq20150720-1
Tomblarom commented 9 years ago

Well I'm getting exact the same problem!!

/src/main/res/layouts
 -- /layouts_fragment
 -- /layouts_activity

img1 img2 img3

Tomblarom commented 9 years ago

"Try declaring a res folder 'src/main/res/activity' and then add a layout folder, and then add the layout file to that." - Sorry ;)