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...
- Following the official Android doc of creating a
res/values/public.xmldoes not work; all of the resources remain public in the app that uses this library. - Following Chris Banes's instruction (and reiterated in this StackOverflow answer) of creating a
res-public/values/public.xmlfolder does not work either; all of the resources are made private, but those listed in thepublic.xmlfile are not made public as they should be.
Does anyone have the definitive instructions for making library resources private? Are there any open-source libraries out there that have properly made their resources private?
I'm using...
- Android Studio v2.2.3
buildToolsVersion "24.0.2"com.android.tools.build:gradle:2.2.3
appcompat-v7uses this. If you look in the AAR, you will seepublic.txt, which is generated based on this information, and it usesres-public. Ditto the design support library and itsmaterial-androidsuccessor.resandres-publicfolders in my build.gradlesourceSets.