(转)解决 android.support.v7.widget.GridLayout 使用 xmlns:app 出现 error 的问题
2018-03-30 20:13
555 查看
转载:https://www.cnblogs.com/Free-Thinker/p/3406281.htmlGridLayout 是在 Android API Level 14 加进来的
它可用来取代 TableLayout
也提供了自由度较大且实用的排版功能为了兼容 4.0 以下的较低版本
Android 提供了 android.support.v7.widget.GridLayout 这个 libuary当使用 xml 档做画面排版的时候
如果是使用 android.support.v7.widget.GridLayout
有一些属性需要使用 app 这个 name space
app:orientation
app:columnCount
app:rowCount
app:alignmentMode
app:useDefaultMargins
app:columnOrderPreserved
app:rowOrderPreserved但是问题来了
即使加上 name space 宣告
xmlns:app="http://schemas.android.com/apk/res/专案package"
Lint 还是会报错
Unexpected namespace prefix "app" found for tag android.support.v7.widget.GridLayout这该如何是好?
找了一下解决方法,最后发现只要告诉 Lint 忽略这个问题就好了xmlns:tools="http://schemas.android.com/tools"
tools:ignore="MissingPrefix"
它可用来取代 TableLayout
也提供了自由度较大且实用的排版功能为了兼容 4.0 以下的较低版本
Android 提供了 android.support.v7.widget.GridLayout 这个 libuary当使用 xml 档做画面排版的时候
如果是使用 android.support.v7.widget.GridLayout
有一些属性需要使用 app 这个 name space
app:orientation
app:columnCount
app:rowCount
app:alignmentMode
app:useDefaultMargins
app:columnOrderPreserved
app:rowOrderPreserved但是问题来了
即使加上 name space 宣告
xmlns:app="http://schemas.android.com/apk/res/专案package"
Lint 还是会报错
Unexpected namespace prefix "app" found for tag android.support.v7.widget.GridLayout这该如何是好?
找了一下解决方法,最后发现只要告诉 Lint 忽略这个问题就好了xmlns:tools="http://schemas.android.com/tools"
tools:ignore="MissingPrefix"
相关文章推荐
- 解决 android.support.v7.widget.GridLayout 使用 xmlns:app 出现 error 的问题
- 导入android-support-v7-appcompat出现问题: android:Widget.Material.ActionButton
- 关于android-support-v7-appcompat.jar的使用的一些问题和解决方法
- 导入android-support-v7-appcompat出现问题: android:Widget.Material.ActionButton
- Failed to resolve: com.android.support:appcompat-v7:27.+问题解决
- 解决Android Studio打开别人包时出现Failed to find: com.android.support:appcompat-v7:21.
- android-support-v7-appcompat.jar 的安装及相关问题解决
- 解决Android Studio打开他人包时出现Failed to find: com.android.support:appcompat-v7:21
- 解决报错问题 Error inflating class android.support.design.widget.NavigationView
- 解决类似Error:Could not find com.android.support:appcompat-v7:25.3.1.
- Android在使用过程中出现The connection to adb is down, and a severe error has occured提示问题的解决
- Failed to resolve: com.android.support:appcompat-v7:27.0.1问题解决
- 解决Android Studio打开别人包时出现Failed to find: com.android.support:appcompat-v7:21.
- 解决新版eclipse/ADT中新建Android工程出现多个appcompat_v7的问题
- 解决报错问题 Error inflating class android.support.design.widget.NavigationView
- Failed to resolve: com.android.support:appcompat-v7:27.0.1问题解决
- 【转】android-support-v7-appcompat.jar 的安装及相关问题解决 --- 汇总整理
- 在使用recyclerview出现的Error:Could not find com.android.support:recyclerview-v7:25.3.1-alpha1. Required b
- 使用android.support.design.widget.CoordinatorLayout出现空白快问题
- Android SnackBar 使用的问题: Error inflating class android.support.design.widget.Snackbar$SnackbarLayout