don't allow capital letter in resources just follow strict agreement
you cannot use two different types of resources with the same name in the same resource folder. for example, you have two resource files in drawable-hpdi. these are a.png and a.xml. When compiling, the compiler will show an error. But if you put a.png in drawable-hdpi and a.xml in drawable-mdpi, then it will not show any errors, since these two resources will be used in two completely different types of devices.
Another interesting thing I found is that if you use a.png and a.xml in the same folder, then the error will show that a.xml is duplicated. But if you use a.jpg and a.png in the same folder, then this will show that a.png is a duplicate. For this, we can guess that there is no file type priority. The compiler will perform a top-down search. since a.png is placed above a.xml, so the compiler will find a.png first, then when they find the xml file with the same name, they will show an error. and for the same reason, using a.jpg and a.png, a.png will show an error.
NB This answer is entirely based on my observation. I did not find any written documentation about this. So if someone proves my mistake with proof, then it will be highly appreciated
source share