必须合式根元素以下文档中的标记。这样做有什么原因呢? [英] The markup in the document following the root element must be well-formed. What is the cause of this?

查看:91
本文介绍了必须合式根元素以下文档中的标记。这样做有什么原因呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<?xml version="1.0" encoding="utf-8"?>
<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/edit_message"
    android:layout_weight="1"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:hint="@string/edit_message" />
<Button
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/button_send" />
</LinearLayout>

<resources>
<string name="app_name">becreativebuddy</string>
</resources>

即时得到的错误行18出20。我下面的教程字一个字,因为我很新的这一点。我想进入本地化的习惯,而且是令人沮丧的,因为当我没有在编译和运行得很好。我道歉,如果这是一个简单的错误,但我还没有发现任何在线帮助我。如前所述我是新来这个所以尽量保持简单。

im getting the error in line 18 out of 20. I am following a tutorial word for word because i am very new to this. I would like to get into the habit of localizing, but is frustrating because when i dont have the it compiles and runs just fine. I apologize if it is a simple error, but i have not found anything online the helps me. As mentioned before i am new to this so try to keep it simple.

推荐答案

您需要删除的3条线在你的文件的末尾开始&LT;资源&GT; 。将这些三线入你的资源目录中的新文件。

You need to delete the 3 lines at the end of your file starting with <resources>. Move these 3 lines into a new file in your resources directory.

这篇关于必须合式根元素以下文档中的标记。这样做有什么原因呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆