How to make Android library resources private?

后端 未结 2 1002
無奈伤痛
無奈伤痛 2021-02-13 09:46

How do I make the resources (string, dimen, color, etc.) in my Android library module private?

I\'ve tried both documented ways of doing this and neither work...

2条回答
  •  醉梦人生
    2021-02-13 10:21

    Option #2 actually works. I had not properly defined my sourceSets in my build.gradle...

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

提交回复
热议问题