Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android studio won't change string

In my strings.xml file I had this string:

<string name="lets_do_this">Let's Do This</string>

This gave me an error of:

Error:(897) Apostrophe not preceded by \ (in Let's Do This)

So I changed the string to this:

<string name="lets_do_this">Let\'s Do This</string>

But every time I build the project, the string keeps changing back to the first version for some reason and I keep getting that error without the ability to change the string. Why is this happening?

like image 498
Yonatan Nir Avatar asked Mar 10 '23 09:03

Yonatan Nir


1 Answers

If it changes back, sounds like you changed the strings xml file that is located within the build folder, but you need to edit your own within res/values of the app module.

like image 57
OneCricketeer Avatar answered Mar 14 '23 10:03

OneCricketeer