当我将 v7 GridLayout 放入线性布局时,我不断收到此错误:
标签 android.support.v7.widget.GridLayout 发现意外的命名空间前缀“xmlns”
如果我在线性或相对布局中没有 GridLayout,那么它会正常工作,但我必须在某种布局中使用 GridLayout,这样滚动才能工作,但我不断收到上面的错误?
有人知道如何防止布局中发生这种情况吗?
感谢您的帮助。
最佳答案
我认为这是 Lint 的一个已知问题:http://code.google.com/p/android/issues/detail?id=52831 .
只需将 tools:ignore="MissingPrefix"添加到 Gridlayout 项即可:
<android.support.v7.widget.GridLayout
...
tools:ignore="MissingPrefix">
为了能够使用此命名空间,请确保将其包含在根标记中:
xmlns:tools="http://schemas.android.com/tools"
关于android-layout - Android v7 网格布局,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15377503/