Android 如何解决此错误格式不正确(无效令牌)

Android 如何解决此错误格式不正确(无效令牌),android,xml,emulation,Android,Xml,Emulation,第6行给出此错误,格式不正确(无效令牌)。如何解决此问题您可以在关闭标记后添加注释 i、 e 不能在标记正文中添加注释。 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"


第6行给出此错误,格式不正确(无效令牌)。如何解决此问题

您可以在关闭标记后添加注释 i、 e


不能在标记正文中添加注释。
<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"
android:background="@color/greenColor"
tools:context=".MainActivity">
<!--This is comment-->