【问题标题】:every time I change my widget xml, I get runtime error in eclipse每次我更改我的小部件 xml 时,我都会在 eclipse 中遇到运行时错误
【发布时间】:2013-07-23 11:50:29
【问题描述】:

我尝试编辑我的 android 小部件 xml。

每次我更改一个属性(可绘制、重力...)

布局被标记为错误

构建运行正常,但应用程序没有运行。

Eclipse 说有错误,但我在错误窗口/问题/log-cat 中看不到任何错误

Unexpected namespace prefix "xmlns" found for tag LinearLayout

【问题讨论】:

  • 您可能应该从线性布局中删除 xmlns 属性。
  • 删除 xmlns 然后清理和构建。除了根标签,删除线性布局的 xmlns。

标签: java android xml eclipse android-layout


【解决方案1】:

xmlns 表示 XML 命名空间。

我认为这个属性应该只在 XML 文件的第一个元素上,这就是你得到错误的原因

【讨论】:

    猜你喜欢
    • 2017-12-16
    • 2021-08-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-04-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多