Skip to content Skip to sidebar Skip to footer

Multiple Resource Folders

I'm trying to add one more resource folder in my Android project. I created a new folder extra-res so my project structure looks like this: + src + main + res +

Solution 1:

I gave you some wrong information when I answered your original question in https://stackoverflow.com/a/28176489/2985303. That'll teach me about not testing an answer before posting it. You need to more fully qualify the resource directory paths, like so:

android {
    sourceSets {
        main {
            res.srcDirs = ['src/main/res', 'src/main/extra-res']
        }
    }
}

Solution 2:

I was getting that error beacause I forgot to include my new resource folder in build.gradle file.

Post a Comment for "Multiple Resource Folders"