8

I tried grouping the layout for my Android project into several subdirectories. I was following this answer.

https://stackoverflow.com/a/32194963/688954

But somewhat the IDE complains URI is not registered and the Gradle build also says Error:Error: Unsupported type 'android.support.design.widget.CoordinatorLayout'.

Can anyone help?

I'm using build tools version 24.0.1

enter image description here

Community
  • 1
  • 1
Petra Barus
  • 3,815
  • 8
  • 48
  • 87

3 Answers3

0

sourceSets must be under android

android {
   ....
   sourceSets {
      main {
          ...
      }
}
Visttux
  • 136
  • 6
0

If you have used any underscore '_' in new resource directory name (/res/layouts-all/layout is proper, but /res/layouts_all/layout is wrong), please remove it. Do clean build. Then this error will be removed. I could solve my problem by this.

Kushal
  • 8,100
  • 9
  • 63
  • 82
0

Your xml file must be in the folder which is named "layout"

enter image description here

Buddy
  • 595
  • 4
  • 4