这一切都发生在我的Project -> res -> values -> strings.xml
文件中。
我的字符串如下:
<string name="Bellowy">"During its action, if HP is less than 50%, increase all your creatures ATK by 30% during their next basic ATK"</string>
控制台输出此错误strings.xml:98: error: Unexpected end tag string
。我已经确定在R.java文件中没有正确注册两个%
符号。如何修复此错误,并在%
中有两个Strings.xml
个符号?
答案 0 :(得分:2)
由于https://api.instagram.com/v1/tags/xxx/media/recent.json?access_token=xxxxx&max_id=996890856542960826'%'是转义字符,因此必定会造成一些麻烦。您可以使用%%
答案 1 :(得分:1)
正如我所用,你可以通过两种方式消除这个问题
添加格式化属性
<string name="Bellowy" formatted="false">"During its action, if HP is less than 50%, increase all your creatures ATK by 30% during their next basic ATK"</string>
添加%%而不是%
<string name="Bellowy">"During its action, if HP is less than 50%%, increase all your creatures ATK by 30%% during their next basic ATK"</string>