【发布时间】:2014-10-02 23:33:03
【问题描述】:
我是 android 开发的新手,并尝试创建一个名为 new_layout.xml 的新布局,我实际上在 Lynda 培训课程中看到它,代码如下,它运行良好。但是每次我关闭 Eclipse 和 AVD 并稍后启动它时,我都会在 xml 文件中遇到一些错误:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView" /> <!-- [I18N] Hardcoded string "TextView", should use @string resource -->
<EditText <!-- This text field does not specify an inputType or a hint -->
android:id="@+id/editText1"
android:layout_width="wrap_content" <!-- Use a layout_width of 0dp instead of wrap_content for better performance -->
android:layout_height="wrap_content"
android:layout_weight="1"
android:ems="10" >
<requestFocus />
</EditText>
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button" />
这里是突然出现的其他错误的截图: ![在此处输入图片说明][1]
【问题讨论】:
标签: java android xml eclipse sdk