android Having an issue with resource subfolders

17 views Asked by At

I have used resource subfolders on multiple projects; but I am now having some difficulties. There are two methods for adding subfolders; however they both rely on the same thing. Adding the folders to your sourceSets resources. Here is that block in my gradle file

 getByName("main") {
            res { 
                srcDirs("src/main/res/layouts/sample")
                srcDirs("src/main/res/drawables/sample")
                srcDirs("src/main/res")
            }
        }

Here are the folder structures. Notice I am using the inner nested layout folder.

After this block when I log out the resources. They are there

sourceSets main res dirs: com.android.build.gradle.internal.api.DefaultAndroidSourceDirectorySet@2d0da729, type=com.android.build.gradle.internal.api.artifact.SourceArtifactTyp
e$ANDROID_RESOURCES@4f90eaf9, source=[src/main/res, src/main/res/drawable/test, src/main/res/layouts/sample, src/main/res/drawables/sample, src/main/res]  

What can I do to debug this issue? Are there gradle tasks or properties or logging techniques that could help me?

enter image description here

0

There are 0 answers