的LinearLayout&QUOT

的LinearLayout&QUOT

本文介绍了错误的解析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"/>

这篇关于错误的解析XML:没有良好的(标记无效)andElement类型和QUOT;的LinearLayout&QUOT;必须后跟属性规范,&QUOT;&GT;&QUOT;或QUOT; /&GT;&QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-11 08:05