I have a library project with several app projects utilizing it. Some of the app projects need PNG files for some of the drawables (i.e. background image) due to the fact that the image repeats (i.e. evenly spaced vertical bars) or would not look good if the edges stretch. Other app projects have solid backgrounds that would be fine to have as 9 Patch images.
Sample Project Structure
Library
--res
----drawable-xxxx
------background.png
------some_image.9.png
OtherProject
--res
----drawable-xxxx
------background.9.png
------some_image.png
However, if I try to add the 9 Patch images to one of the projects, I get a compile time error that I have duplicate resources with the same name. Is there an easy way to get around this without having to redefine the background file in each product (which would not be very maintainable)?
As Gabe Sechan and scottt pointed out in comments to the question, the name of the files has to be unique to identify them.