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...
What's wrong with this comment in Android Layout XML?
-
22-06-2023 - |
문제
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)
해결책
제휴하지 않습니다 StackOverflow