【发布时间】:2014-05-21 00:08:20
【问题描述】:
我正在尝试创建一个多列列表视图,并在名为 row 的布局文件夹中创建了一个新的 xml 文件。但是我收到一个错误提示
解析 XML 时出错:格式不正确(令牌无效)
虽然我认为我错过了关闭标签和/或输入错误的内容,但我似乎找不到问题。非常感谢!
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/name"
android:gravity="left"
android:layout_width="50dip"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/path"
android:gravity=”center”
android:layout_width="70dip"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
【问题讨论】:
-
您忘记了布局的结束标记。
-
@Onik 我刚刚补充说,但是我仍然遇到同样的错误
-
+ 你这里有不同的双引号:
android:gravity=”center” -
我也改了,还是一样的错误
标签: android xml android-listview