错误的解析XML:没有良好的(标记无效)andElement类型和QUOT;的LinearLayout"必须后跟属性规范,">"或QUOT; />"
问题描述:
<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/editmessage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="@string/edit_message"
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_conent"
android:text="@string/button_send"/>
<?xml version"1.0" encoding="utf-8"?>
<rescources>
<string android:name="app_name">becreativebuddy</string>
<string android:name="edit_message">Enter a message</string>
<string android:name="button_send">Send</string>
<string android:name="action_settings">Settings</string>
<string android:name="title_activity_main">MainActivity</string>
</rescources>
</LinearLayout>
即时得到在第7行。我不知道为什么它是在告诉,因为,我刚学的事实,我说,我有一个想法,标题说这两个错误,因此是很好的。
Im getting those two errors stated in the title in line 7. I have no idea why it is telling me that i have an idea, because of the fact that I am just learning, so be nice.
答
这些浏览
此处
<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/editmessage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="@string/edit_message"
需要关闭。每个查看
在需要使用 /&GT某些时候被关闭;
。该的LinearLayout
是一个根查看
所以它正在收于年底
need to be closed. Every View
needs to be closed at some point with />
. The LinearLayout
is a root View
so it is being closed at the end with
</LinearLayout>
所以它只是需要一个&GT;
上方
<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
已准备好被关闭,因为在完成添加属性这么加 /&GT;
The EditText
is ready to be closed since you are done adding properties to it so add />
<EditText android:id="@+id/editmessage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="@string/edit_message"/>