這是我的第一個Android項目,我不能調試此次培訓程序Building a Simple User Interface錯誤在我的Android項目中的XML文件
當我調試它的運行我看到這一點:
錯誤的XML文件:中止構建。
(Android設備:提示= 「@字符串/ 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_height="wrap_content"
android:layout_width="wrap_content"
android:hint="@string/edit_message" />
<Button
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/button_send"
</LinearLayout>
你創建一個裏面的strings.xml名edit_message串關閉第一「的LinearLayout」? – Blackbelt
你在按鈕結尾還缺少'/>'。你還應該在strings.xml中定義一個名爲'edit_message'的字符串 – Raghunandan
你可以在這個頁面找到完整的佈局:http://developer.android.com/training/basics/firstapp/building-ui.html。 – Brtle