I am using Android Studio and Gradle to develop an Android application.
I am creating a theme and I got dozen of resource files. So to make my project cleaner I (following this SO answer) moved all theme related files to another folder called res_theme and inside my build.gradle file I added the following to merge the two resource files folders:
sourceSets {
main {
res {
srcDir 'src/main/res_theme'
}
}
}
Now when I build my project I get the following error in several resource files:
URI is not registered in resource file
That error occurs in this line:
<resources xmlns:android="http://schemas.android.com/apk/res/android">
Another thing I noticed is this popup message:
'main' in build cannot be applied to '(groovy.lang.Closure)'
in this line: main {
EDIT
Project structure:
AppName
|--------lib
|--------src
|--------main
|--------java
|--------res
|--------res_theme
|--------AndroidManifest.xml
|--------AppName.iml
|--------build.gradle
|--------proguard-rules.txt
If you need more detail please tell me