In my Android app I want to have subdirectories in res/layout. Of course Android doesn't support this itself, so I try to configure Gradle to do this.
My project structure:
src/
/package_with_java_source
res/
/drawable
/layout
/someLayDir
Now I want to gradle merge this subdirs for me and build project:
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
assets.srcDirs = ['assets']
res.srcDirs =
[
'res/layout/someLayDir',
'res/layout',
'res'
]
}
}
Unfortunately when I try to build project I get error:
Error:(29, 60) Gradle: error: cannot find symbol variable app_bar
app_bar is my layout id (R.id.app_bar). Please help me :(
P.S. If it is important I use Intellij Idea 14