When using an Android Library Project how do you reference xml resources properly? When using an Android Library Project how do you reference xml resources properly? xml xml

When using an Android Library Project how do you reference xml resources properly?


Its important to build the project after adding resources (or just have autobuild on) and cleaning the project helps most of the times. Restarting Eclipse when "something" go wrong is a good idea, too.

Also note that Android merges the recources, so the last project that is build "wins" the name. For this reason it's a good idea to prefix ALL resources somehow.


I use IntelliJ and what worked for me is to reference the resource normally and to make sure the library is added as a dependency of the project


I just ran into the same issue however cleaning in Eclipse did not work until I set both the library project and the regular project to have a matching : Target Build Property.