Hardcoded string , should use @string resource警告 Tag start is not closed

<TextView
            android:id="@+id/txtOne"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:textSize="25sp"
            android:text="请根据您自己的情况选择:"
            android:textStyle="bold"
            />

显示Hardcoded string , should use @string resource警告和Tag start is not closed报错。
发现是text位置的问题,修改位置如下:

<TextView
            android:id="@+id/txtOne"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:textSize="25sp"
            android:textStyle="bold"
            android:text="请根据您自己的情况选择"
            />

也就是把android:text放最下面就OK了。

猜你喜欢

转载自blog.csdn.net/z2431435/article/details/120832702