Android XML layout: Error parsing XML: not well-formed (invalid token) - I did close my View tags -
i getting error on button
view. many questions saw on so, seems error arises when don't close views properly.
i think have closed tags still getting error. why that?
<relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="${relativepackage}.${activityclass}" > <button android:layout_width="wrap_content" android:layout:height="wrap_content" android:text="@string/mainactivity_button1" android:onclick="startsecondactivity" /> </relativelayout>
there's additional/typo :
in attribute name.
replace
android:layout:height
with
android:layout_height
the error not unclosed tags xml syntax problems in general. in xml, can have 1 namespace prefix attribute, , namespace prefixes separated name :
.
Comments
Post a Comment