错误:错误解析XML:没有良好的(标记无效)...?错误、标记、良好、XML

2023-09-06 01:38:27 作者:两个人才可以丶背对背拥抱

我工作的一个应用程序,其中我有下面的XML。但是当我尝试清洁/建立我的项目则出现下列错误:

I am working on an application, in which i have a following xml. but when i try to clean/build my project the following error occurs:

的错误:错误解析XML:没有良好的(标记无效)

"error: Error parsing XML: not well-formed (invalid token)"

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView  
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
android:text="@string/hello";
/>
</LinearLayout>

这是什么意味着什么?感谢您的帮助提前.. :-)

What does it possibly mean ? Thanks for help in advance..:-)

推荐答案

这意味着在你的XML文件中的编译错误,而这不应该存在:拼写错误/虚假字符/不正确的命名空间

It means there is a compilation error in your XML file, something that shouldn't be there: a spelling mistake/a spurious character/an incorrect namespace.

您的问题是你有一个分号,这行后不应该出现的:

Your issue is you've got a semicolon that shouldn't be there after this line:

  android:text="@string/hello";
 
精彩推荐
图片推荐