2013-05-19 25 views
0
<?xml version="1.0" encoding="utf-8"?> 
<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" /> 
</LinearLayout> 

<resources> 
<string name="app_name">becreativebuddy</string> 
</resources> 

即時獲得第18行中的錯誤20我正在跟隨一個字的教程,因爲我對此很新。我想進入本地化的習慣,但是令人沮喪,因爲當我沒有它的編譯和運行就好。我很抱歉,如果這是一個簡單的錯誤,但我還沒有發現任何網上幫助我。如前所述,我對此很陌生,所以儘量保持簡單。根元素之後的文檔中的標記必須是格式良好的。這是什麼原因?

+0

你已經在佈局文件中添加了字符串資源 –

+0

我敢打賭,「一字一換」並沒有說將資源標籤放在佈局中。那是你的問題。再讀一遍。 – Simon

回答

1

您需要從<resources>開始刪除文件末尾的3行。將這3行移動到資源目錄中的新文件中。

相關問題