【发布时间】:2014-03-19 20:38:57
【问题描述】:
在此行发现多个注释: - 错误:解析 XML 时出错:文档元素后出现垃圾 根元素之后的文档中的标记必须格式正确。
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.onyourcar.MainActivity"
tools:ignore="MergeRootFrame" />
<TextView
android:id="@+id/hello"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="@string/hello_world"
tools:context=".MainActivity" />
【问题讨论】:
-
请发布完整的 XML
-
错误似乎不在您的文本视图中,请发布其余部分
-
其实我是一个自学者,我想做的是创建一个新的id,这样我就可以看到对应用程序的影响。
-
你关闭这个 FrameLayout 标签了吗?这是你的整个 xml 内容吗?
-
是的,这是我的整个 xml