문제

Why does this XML give errors? (Relevant portion extracted from larger file.)

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    <!--  android:layout_gravity="center_horizontal|vertical" -->
    android:padding="5dip"
    />

This gives two errors:

Element type "TextView" must be followed by either attribute specifications, ">" or "/>".  
error: Error parsing XML: not well-formed (invalid token)
도움이 되었습니까?

해결책

You can't use comment inside xml element. i.e. in TextView element only attribules (like name="some value") are allowed. That should be a fresh question...

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top