Android Studio reported out:
unescaped or nonterminated entity/reference
When tried to use "and", does anyone know how to fix it?
Android Studio reported out:
unescaped or nonterminated entity/reference
When tried to use "and", does anyone know how to fix it?
'&' --> '&'
'<' --> '<'
'>' --> '>'
Work for me
android:background="@{entry.boolean && entry.boolean2 ? @drawable/image :@drawable/image2}"
The issue is that even inside quotation marks, Android is looking for the ampersand (&) to mean something. To let it know that you REALLY are just using it as text, you have to code it out by entering it as "&" (without the quotation marks - that's just there to show that you have to have all five of those characters).
I got the same error, and as soon as I changed "&" to "&" error went away. Hope this helps.