Error in strings.xml file in Android

前端 未结 9 616
[愿得一人]
[愿得一人] 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:29

    https://developer.android.com/guide/topics/resources/string-resource.html#FormattingAndStyling

    Escaping apostrophes and quotes

    If you have an apostrophe or a quote in your string, you must either escape it or enclose the whole string in the other type of enclosing quotes. For example, here are some stings that do and don't work:

    "This'll work"
    This\'ll also work
    This doesn't work
    XML encodings don't work
    

提交回复
热议问题