【问题标题】:The markup in the document following the root element must be well-formed. styles.xml [duplicate]文档中根元素之后的标记必须格式正确。样式.xml [重复]
【发布时间】:2013-01-14 18:52:49
【问题描述】:

我得到的错误:

"The markup in the document following the root element must be well-formed."

使用 Eclipse,我的 styles.xml 文件:

<?xml version="1.0" encoding="utf-8"?> 
<resources xmlns:android="schemas.android.com/apk/res/android"/>
   <style name="ToDoTheme"parent="@android:style/Theme.Black"> 
      <item name="android:textSize">12sp</item> 
   </style> 
</resources>

【问题讨论】:

  • 这意味着你的 XML 有语法错误。
  • 发布您的 styles.xml 内容
  • 很清楚,您的 XML 格式不正确。
  • schemas.android.com/apk/res/android">
  • 回滚解释:请不要更正问题中的代码,因为错误的根源已经消失,因此您的问题不再有意义。

标签: android xml styles


【解决方案1】:

&lt;resources.../&gt;; 项目上的 ; 在那里做什么。我会先摆脱它。

【讨论】:

    【解决方案2】:

    哦!看起来您关闭 &lt;resources .... /&gt; 太快了。您需要删除第一个 resources 上的 / 以使关闭的 &lt;/resources&gt; 保持平衡。

    【讨论】:

    • 不,再次...((
    • 嗯……它当然不应该在那里。
    • 好吧..作为最后一枪,我会确保项目之间有空格。 &lt;style name="ToDoTheme"parent...&lt;style name="ToDoTheme" parent...。如果这不起作用,我不知道。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多