Java 具有布局的意外标记
我是新来的,我也是新来安卓开发的。我对不想编译的布局有问题。这是我的密码:Java 具有布局的意外标记,java,android,layout,Java,Android,Layout,我是新来的,我也是新来安卓开发的。我对不想编译的布局有问题。这是我的密码: <?xml version="1.0" encoding="utf-8"?>" </LinearLayout> <WebView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="matc
<?xml version="1.0" encoding="utf-8"?>"
</LinearLayout>
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:layout="http://schemas.android.com/apk/res-auto"
android:id="@+id/webView"
layout:width="match_parent"
layout:height="match_parent" />
</LinearLayout>
”
错误出现在“LinearLayout”行,上面写着“意外标记”。我手动修改了此文件,可能修改了破坏我文件的内容。您的第二行中有一个结束标记。通过更改将其作为开始标记
</LinearLayout>
到
”
你没有合适的开场白。已存在,而不是第2行。线性布局的开头标记有问题。应该是这样的
//Opening tag <LinearLayout // Closing tag </LinearLayout>
//在回答下面开始标记检查。开始错误标记您的屏幕截图在第一行末尾显示一个“
。将其删除。
<?xml version="1.0" encoding="utf-8"?>"
<LinearLayout>
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:layout="http://schemas.android.com/apk/res-auto"
android:id="@+id/webView"
layout:width="match_parent"
layout:height="match_parent" />
</LinearLayout>
//Opening tag <LinearLayout // Closing tag </LinearLayout>