Max Billionaire Max Billionaire - 23 days ago 6
Android Question

Android Studio gradle keeps on repeating already fixed error when building

I'm really frustrated now. I created a string resource like this in the values.xml file

<string name="details">the yadayadayada is going to be a great suspension and when it comes, it's good. after a long time</string>


and after running my app, i had this error

Error:(348) Apostrophe not preceded by \ (in the yadada is going to be a great suspension and when it comes, it's good. after a long time)


so i preceded the apostrophe with '\' but the error was still showing. Now i've actually deleted the string resource but when ever gradle builds, it recreates the resource again and then gives me the same error again. I've tried "invalidate cache/restart", i've tried deleting my .gradle folder, i even used the command

gradlew --stop clean build


but the error is still showing. i really don't know what to do now.
Thanks for the help in advance

Answer

I think you are modifying in the generated file(has same name) instead of your own res file. when you click the error it opens generated file not the right file.So go to your res folder and change the same.

Comments