Android 错误:(10,6)错误:根元素后面的文档中的标记必须格式正确
我对ScrollView有一些问题。“元素ScrollView必须声明,我不知道我能用那个标记做什么,有人能帮我吗?”Android 错误:(10,6)错误:根元素后面的文档中的标记必须格式正确,android,xml,scrollview,Android,Xml,Scrollview,我对ScrollView有一些问题。“元素ScrollView必须声明,我不知道我能用那个标记做什么,有人能帮我吗?” <?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true"
android:overScrollMode="never"
android:scrollbars="none" />
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/background_color" />
<ImageView
android:id="@+id/close_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_gravity="top|end"
android:layout_margin="4dp"
android:contentDescription="@string/closebutton"
android:padding="5dp"
android:src="@drawable/close" />
<FrameLayout
android:id="@+id/frameContainer"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@+id/close_activity" />
</RelativeLayout>
</ScrollView>
不要对非空元素使用自动关闭标记。 替换
android:scrollbars="none" />
与
及
与
否则您的XML格式将不正确。不要对非空元素使用自动关闭标记。 替换
android:scrollbars="none" />
与
及
与
否则,您的XML格式将不正确。只是以红色突出显示,但不起作用;/@kubade220:如果您对发布的XML进行了我的答案中列出的两项更改,那么它将是格式正确的。如果您仍然有问题,您必须清楚新XML的确切外观(编辑您的问题并添加它)如果您需要进一步的帮助。仅以红色突出显示且不起作用;/@kubade220:如果您对发布的XML进行了我的答案中列出的两项更改,那么它将是格式良好的。如果您仍然有问题,如果您需要进一步的帮助,您必须清楚新XML的确切外观(编辑您的问题并添加它)。
android:background="@color/background_color"/>
android:background="@color/background_color">