1

I was working on my android studio when this error appeared in I think gradle-values files. here is what messages say

/home/aayush/.gradle/caches/transforms-1/files-1.1/play-services-
cast-framework-
11.8.0.aar/32e84c2c10bff7a8fd7f6321ccbff502/res/values/values.xml
Error:(5, 1) error: could not parse array item.
Error:java.util.concurrent.ExecutionException: 
com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for 
details

I tried deleting the whole build folder,.gradle folder, cleaning and rebuilding folder, invalidating caches and restarting android studio but, this error comes again and again. I am using android studio 3.1, the latest one. please help. If you need any other detail, just tell me. i am facing this problem for the first time, so, dont know what to post.

4
  • What is inside values.xml? Commented Jan 7, 2018 at 18:22
  • Michael there are some arrays(may be 1- 2) present at the starting.The thing is these files are not of project(warning shown when i edit those).I tried to remove arrays but then it opens new file Values.xml which again has an array.I tried deleting array from 2 files but i think loop will continue further. Commented Jan 8, 2018 at 11:37
  • It looks like the at an array defined in that library is invalid. Could you post the arrays you found in that file? Once you identify which one is invalid you can override it in your own library with a valid one. Commented Jan 9, 2018 at 11:41
  • update on this problem. The problem is in google play services i think. Commented Jan 16, 2018 at 8:15

1 Answer 1

1

I was facing that issue too.

That may be invoked in several reasons.

In my case, I got the error because of the 'strings.xml' file has like this components

<string name="today_string">'today'</string>

this mistakes made this error, and I converted 'today' to \'today\'

And it solved my issue. Refer.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you for your answer, there were similar characters which causes problem. Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.