0

This is all happening in my Project -> res -> values -> strings.xml file.

My string is as follows:

<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>

The console outputs this error strings.xml:98: error: Unexpected end tag string. I've identified that having two % signs does not register correctly in the R.java file. How can I fix this error and have two % signs in my Strings.xml?

krikara
  • 2,395
  • 10
  • 37
  • 71

2 Answers2

2

It must be creating some trouble due to percent encoding '%' is an escape character. You can use %%

Identity1
  • 1,139
  • 16
  • 33
1

As i used you can eliminate this problem by two ways

Add formatted attribute

<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>

Add %% instead of %

<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>
Bruce
  • 8,609
  • 8
  • 54
  • 83