There's an issue with how you use the folders I think.
res.srcDirs is meant to be top-level res folders only. The fact that you
include src/main/res/layout itself is a bad idea since res/layout is a
valid res folder under layout.
The resource merger doesn't touch the layout files. it just copies them
(unlike the files under values[-*]/). This makes me thinks that it's really
the fact that you use these nested folders that is wrong.
A better way would be to do:
main {
res.srcDirs =
[
'src/main/fragments',
'src/main/res'
]
}
On Sun, Nov 23, 2014 at 4:25 AM, Alex Corll <[email protected]> wrote:
> Quoting from a coworker's post on SO
> <http://stackoverflow.com/questions/26433394/uri-is-not-registered-android-xml-namespace>.
> We are wondering if it is possible to use a different directory structure
> for xml resources by defining this in build.gradle:
>
> sourceSets {
>
> main {
> res.srcDirs =
> [
> 'src/main/res/layout/fragments',
> 'src/main/res/layout',
> 'src/main/res'
> ]
> }
> }
>
>
> This doesn't work because Android Studio won't recognize the Android
> namespace attribute in deeper directories. How can we achieve this?
>
> --
> You received this message because you are subscribed to the Google Groups
> "adt-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
--
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com
Please do not send me questions directly. Thanks!
--
You received this message because you are subscribed to the Google Groups
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.