Android 不熟悉XML编码和接收此错误。错误:解析XML:junk后的文档元素时出错
错误:解析XML:junk后的文档元素时出错 我正在做一个非常基本的代码,只是为了变得更好Android 不熟悉XML编码和接收此错误。错误:解析XML:junk后的文档元素时出错,android,xml,android-layout,Android,Xml,Android Layout,错误:解析XML:junk后的文档元素时出错 我正在做一个非常基本的代码,只是为了变得更好 <?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_
<?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="vertical">
<textview
android:layout_width="1dp"
android:layout_weight="0dp"
android:layout_height="175dp"
android:text="@string/welcome_app"
android:text="@string/action_settings" ></textview>
</LinearLayout>
您不允许在TextView标记的末尾有空格
替换为
<TextView
android:layout_width="1dp"
android:layout_height="175dp"
android:text="@string/action_settings"/>
//我现在修改了您的代码,请尝试一下。
标记区分大小写,因此请使用:
<Textview
android:layout_width="1dp"
android:layout_weight="0dp"
android:layout_height="175dp"
android:text="@string/welcome_app"
android:text="@string/action_settings" >
</Textview>
谢谢你修复了它!现在我用代码得到了重复的属性;
<Textview
android:layout_width="1dp"
android:layout_weight="0dp"
android:layout_height="175dp"
android:text="@string/welcome_app"
android:text="@string/action_settings" >
</Textview>