Android resource compilation failed in v3.2

For me I had the layout width and layout height in the layout view and the LinearLayout view for databinding. This threw a duplicate error.

I fixed this by removing the layout_width and layout_height attributes in <layout>.


I was facing this issue today after updating gradle from 3.1.4 to 3.2.0. I don't know why, but the build started to throw that exception. i deleted the build folder, and deleted the gradle caches folder but nothing worked, so i looked at the merged values.xml and turns out that my ids.xml was defining a wrong id that was being merged to the values.xml:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <item name="downloading_package" type="id">Baixando pacote de sincronização</item>
</resources>

And apparently this was working before the update... for my case i deleted the ids.xml file (it was useless in the project)

I wish i could know why before the update everything was working


the <item> in values.xml at line 900 ...might be of resource-type id.

the correct syntax would be (just as the error message tells):

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <item type="id" name="id_name" />
</resources>

see the documentation.


I'm just finishing this issue a few minutes ago, try to modify or delete id.xml, if you think you don't have it, try to find in another module in your app. I change my value resource from <item name="header_view" type="id">header_view</item> to <item name="header_view" type="id"/> and it worked for me.