【问题标题】:Why would I get an error on a comment?为什么我会在评论中收到错误消息?
【发布时间】:2012-03-01 10:38:04
【问题描述】:

为什么我会得到“错误:解析 XML 时出错:格式不正确(无效令牌)”

在这一行(这是一个注释):

<!-- added fillViewport as preventive measure after reading http://stackoverflow.com/questions/2599837/linearlayout-not-expanding-inside-a-scrollview -->

?

【问题讨论】:

  • 我们能得到更多的上下文吗?我只通过验证器运行了评论,没有错误。

标签: android android-layout


【解决方案1】:

我猜你在标签中间添加了该评论。你不能那样做。这是错误的:

  <ScrollView
     android:... <!-- this won't work -->
     android:...
  >
  </ScrollView>

只需将它移到 之外。

【讨论】:

    【解决方案2】:

    尝试删除 URL 中的破折号。尝试在文本编辑器中显示所有不可打印的字符,因为您可能复制了控制字符。

    【讨论】:

      【解决方案3】:

      删除评论并手动输入。您很可能在其中有不可打印的字符。

      【讨论】:

        猜你喜欢
        • 2015-01-25
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2019-09-17
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多