[英]message displayed when trying to run
錯誤:錯誤:找不到與給定名稱匹配的資源(在“提示”中,值為“ @ string / edit_message”)
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<EditText android:id="@+id/edit_message"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:hint="@string/edit_message" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/button_send" />
您在res/values/strings.xml
文件中缺少字符串“ edit_message”。
添加值,例如:
strings.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
...
...
<string name="edit_message">This is my edit message!</string>
...
...
</resources>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.