0

私の最初の Android アプリは、「シンプルなユーザー インターフェイスの構築」に従っています。しかし、自分のデバイスで実行すると、エラーが発生しました。

E/AndroidRuntime(30660): FATAL EXCEPTION: main
E/AndroidRuntime(30660): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myfirstapp/com.example.myfirstapp.MainActivity}: android.view.InflateException: Binary XML file line #7: Error inflating class ViewText

E/AndroidRuntime(30660):    at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(30660): Caused by: android.view.InflateException: Binary XML file line #7: Error inflating class ViewText

しかし、読み込まれた xml を調べると、レイアウト ファイルに TextView 要素がありません。私のレイアウトファイルはすべて次のとおりです。

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:orientation="horizontal"
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
              >
  <EditText android:id="@+id/edit_message"
            android:layout_weight="1"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:text="@string/edit_message"
            />
  <Button android:id="@+id/send_button"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content" 
          android:text="@string/button_send"
          android:onClick="sendMessage" />
</LinearLayout>

私は混乱しています、何が問題なのですか?助けてくれてありがとう。

4

1 に答える 1