Error in strings.xml file in Android

前端 未结 9 636
[愿得一人]
[愿得一人] 2020-11-28 04:37

I have declared a long string in string.xml of an application.

Declared like this

PLEASE READ THESE TERMS          


        
9条回答
  •  日久生厌
    2020-11-28 05:39

    Solution

    Apostrophes in the strings.xml should be written as

    \'
    


    Example

    In my case I had an error with this string in my strings.xml and I fixed it.

    Most arguments can be ended with three words, "I don\'t care".
    

    Here you see my app builds properly with that code.

    enter image description here

    Here is the actual string in my app.

    enter image description here

提交回复
热议问题