0
votes

Android resource compilation failed Output: values_values.arsc.flat: error: failed to open.

Command: C:\Users\KAMAL.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\1004f9e02d2cf44b39e5208f3f298ce2\aapt2-3.2.1-4818971-windows\aapt2.exe compile --legacy \ -o \ D:\AndroidRoomDbTutorial\app\build\intermediates\res\merged\debug \ D:\AndroidRoomDbTutorial\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #2

It is room database application .

2
Hello @RogerK have you tried to Clean and Rebuild projectNilesh Panchal
Indent your code properly and show us the code where the error originates from.Taseer
Yes I did.@nilesh-panchal. Even I clear all the caches from 'C:User/AndroidStudio' drive.RogerK
@TaseerAhmad It is having 10 in number of .java file Coding. Then this question will become so long. Do you really need code , though compiler doesn't show error on any line of coding ?RogerK
I was expecting the compiler to direct to the point of error origin but in your case it not working. Can you open your values.xml file and look for any errors? I had kind of same error and I was able to fix it by modifying my value.xml file.Taseer

2 Answers

0
votes

Now Android Studio will be giving you error for explicit values and if those values are coming from some library you are using then you can't make a change in the intermediate file so instead change here and while merging your code Android studio takes care of it.

<resources>
<item name="faqID" type="id">faq</item>

Changed it to:

<resources>
<item name="faqID" type="id"/>

Please refer this link https://developer.android.com/guide/topics/resources/more-resources#Id

You can also try as follows

If problem still exists please try as follows

  • File | Invalidate Caches / Restart
  • Deleting .idea folder
  • Running gradlew clean
  • Re-import the project