为什么这个XML会出错? (从较大的文件中提取相关部分。)
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
<!-- android:layout_gravity="center_horizontal|vertical" -->
android:padding="5dip"
/>
这会产生两个错误:
Element type "TextView" must be followed by either attribute specifications, ">" or "/>".
error: Error parsing XML: not well-formed (invalid token)
答案 0 :(得分:1)
您无法在xml元素中使用注释。即在TextView元素中,只允许属性(如name =&#34;某些值&#34;)。这应该是一个新问题...