I have the following two textViews in my layout:
<TextView
android:id="@+id/TextView_playSourceWord"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_centerHorizontal="true"
android:layout_below="@+id/TextView_playTheme"
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_margin="@dimen/word_box_margin"
android:text="Maison" />
<TextView
android:id="@+id/TextView_playTargetWord"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_centerHorizontal="true"
android:layout_below="@+id/TextView_playSourceWord"
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_margin="@dimen/word_box_margin"
android:text="?" />
I don't have any error for the first one, but in the second one android:textAppearance="?android:attr/textAppearanceLarge"
is generating the following error:
error: Error: Resource id cannot be an empty string (at 'text' with value '?').
I also have other TextViews in other layouts with the same value for textAppearance and there are no errors there. Is there a way to fix this without having to re-create the style manually?
You have to escape ? as coded below
android:text="\?"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With