Android 在我的xml文件中,我得到一个关于我的文本输入的警告通知,我';I’我想知道如何修理它

Android 在我的xml文件中,我得到一个关于我的文本输入的警告通知,我';I’我想知道如何修理它,android,text,Android,Text,注意[I18N]硬编码字符串“您想给Zohan打电话吗?”,应使用@string resource <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" andro

注意[I18N]硬编码字符串“您想给Zohan打电话吗?”,应使用@string resource

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" 
>

<TextView 
    android:id="@+id/TextView01"
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:text="Would you like to give Zohan a call?"
    android:layout_marginTop="200dp"
    android:layout_marginLeft="20dp"
    android:textSize="18dp"/>

您应该将文本存储在资源属性文件中,并使用
@
符号将它们链接到XML文件

有关详细信息,请参阅。

您不应使用字符串。相反,您应该将字符串放在values/strings.xml中。 按住Ctrl+1组合键,将显示修复错误的方法。 请参阅android字符串文档: