Reputation: 1316
Android resource compilation failed
Output: C:\Users\Desktop\Pulse-AR\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:2381: error: <item> inner element must either be a resource reference or empty.
C:\Users\Desktop\Pulse-AR\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:2398: error: <item> inner element must either be a resource reference or empty.
Command: C:\Users\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.0-4818971-windows.jar\bc8857d6afe6e4598f406355cc075303\aapt2-3.2.0-4818971-windows\aapt2.exe compile --legacy \
-o \
C:\Users\Desktop\Pulse-AR\app\build\intermediates\res\merged\debug \
C:\Users\values\values.xml
Daemon: AAPT2 aapt2-3.2.0-4818971-windows Daemon #0
values.xml:2398
<item name="tag" type="id">tag</item>
Above error gives in after update new AndroidStudio(3.2) with Update Gradle (gradle-4.6-all)
Upvotes: 10
Views: 2377
Reputation: 799
go to ids.xml file
replace <item name="tag" type="id">tag</item>
with <item name="tag" type="id"/>
if this tag <item name="tag" type="id">tag</item>
is not exist, then mean that tag is inside the library you are using, so just add the tag <item name="tag" type="id"/>
for override it from the library.
after you override that tag, you can find which library is using that tag by find usage , and fix that library.
Upvotes: 2
Reputation: 12583
Try add below option inside gradle.properties
android.enableAapt2=false
Upvotes: 3
Reputation: 71
Have been working through this problem all day, lots of head scratching.
What worked for me was going into the ids.xml, and removing all values between the item tags of "type=id"
For example:
<item type="id" name="icon">textToBeRemoved</item>
Goes to
<item type="id" name="icon"></item>
I hope this helps!
Upvotes: 7