I have declared a long string in "string.xml" of a application.
Declared like this
post your complete string. Though, my guess is there is an apostrophe (') character in your string. replace it with (\') and it will fix the issue. for example,
//strings.xml <string name="terms"> Hey Mr. Android, are you stuck? Here, I\'ll clear a path for you. </string>