解决方案 »

  1.   

    出现了这样的错误Error parsing XML: not well-formed (invalid token) 找不出原因,所以把代码copy上来了,麻烦各路大神指教
      

  2.   

    开头没有相关的<RelativeLayout>标签
      

  3.   

    常见问题:xml中检查控件是否缺少开头或结尾,dreawable等文件夹中资源命名是否和系统保留字重复导致building ,clean无法正常!
      

  4.   

    我来说一下解决方法吧。顺便说一句楼主大傻逼! 
      <TextView
            android:id="@+id/operation"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/hello_world" 
            />
    改成
     <TextView>
            android:id="@+id/operation"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/hello_world" 
            </TextView>
      

  5.   

     <Button
            android:id="@+id/caculate"
            android:layout_width ="wrap_content"
            android:layout_height="wrap_content"
             android:text="@string/hello_world"
             />
    改成
     <Button
            android:id="@+id/caculate"
            android:layout_width ="wrap_content"
            android:layout_height="wrap_content"
             android:text="@string/hello_world" />
    我的这样改就OK了
      

  6.   

    我这便发现 是.xml文件名之前命名形式问题也会导致,命名形式应该是src下对应的名,例如 src下有一个Activity 在Layout里面应该是activity_activity 这样就没问题了。。在R,java里面地址也自动写上了。不知道对不对撒,有用没。
      

  7.   

    鼠标右键选择Source然后再选Format 就可以解决此问题
      

  8.   

    楼主是我儿子,最近脑残片吃多了,让大家见笑了。我回去一定哈哈收拾他。感谢别楼层的兄弟给的方法。我的问题是通过21楼兄弟的方法好的
    “鼠标右键选择Source然后再选Format 就可以解决此问题”
      

  9.   

    说下我的解决方法吧, 删到只有第一行xml声明 然后就没有错误提示了 然后再撤销~~解决 ECLIPSE真的是汗~~
      

  10.   

     Error parsing XML: not well-formed (invalid token) 
    10楼是正解!究其原因 
      

  11.   

    我的事这样解决的,对那个xml文件格式化一下(ctrl+shift+f),然后在clean一下
      

  12.   

    把鼠标箭头移到出错误的layout上 点击鼠标右键选择Source然后再选Format 就可以解决此问题
      

  13.   

    鼠标右键选择Source然后再选Format 就可以解决此问题
    #21楼 正解,太帅了鄙视sb楼主。不过也正是有这个sb  才衬托出21楼的伟大!!!!!
      

  14.   

    在哪选择~~选择Source然后再选Format    这个Source在哪呀