How to fix compile error in Android application where strings.xml contain invalid characters

I created an application with a string-array in the strings.xml file. Unfortunately, I left some apostrophe in one of the string values that was:
D’Souza

Obviously, at compile time, the Android Studio 2.2 IDE threw an error about invalid characters not preceded by a \. I should have actually put the string as:
D\’Souza

Now, I corrected the string value in the strings.xml file, but yet kept getting an error. Each time, a file values.xml would open in the IDE. All attempts to rebuild the project after cleaning it failed to fix the issue.

Finally, I decided to go to the command line and remove the file values.xml altogether. (Extreme issues require extreme solutions :-).

After deleting the file values.xml, rebuilt and recompiled the project and the app got compiled with no errors.

Comments are closed.

September 2017
M T W T F S S
« Aug    
 123
45678910
11121314151617
18192021222324
252627282930