My first app can't inlate xml file error
My first android app is according "Building a Simple User Interface". but
when I run it on my device, it gave me out errors,
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
but, when I look into the loaded xml, it don't have any TextView element
in my layout file. my layout file is all as following,
<?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>
I am confused, what's the problem? thanks your help.
No comments:
Post a Comment