解决 android.support.v7.widget.GridLayout 使用 xmlns:app 出现 error 的问题
GridLayout 是在 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"
解决 android.support.v7.widget.GridLayout 使用 xmlns:app 出现 error 的问题的更多相关文章
- 配置android.support.v7.widget.Toolbar 搜索框样式
AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xm ...
- 报错:Binary XML file line #7: Error inflating class android.support.v7.widget.RecyclerView
近期学习RecyclerView,使用eclipse引用RecyclerView.编写完demo后编译没有问题,一执行就挂掉,错误例如以下: 07-22 23:05:34.553: D/Android ...
- int android.support.v7.widget.RecyclerView$ViewHolder.mItemViewType' on a null.....
Android.support.v7.widget.RecyclerView$ViewHolder.mItemViewType' on a null..空指针问题,费劲心思才找到报空指针的原因: 代码 ...
- android.support.v7.widget.Toolbar 中menu图标不显示问题
<?xml version="1.0" encoding="utf-8"?><menu xmlns:android="http:// ...
- Error inflating class android.support.v7.widget.Toolbar
建立程序的时候出现的错误 style.xml中的 <!-- Base application theme. --> <style name="AppTheme" ...
- Cause for NullPointerException android.support.v7.widget.RecyclerView.onMeasure
because you have not set LinearLayoutManager to RecyclerView. for example: mRecyclerView = (Recycler ...
- android.support.v7.app.AppCompatActivity不能使用的解决办法
最近Android Studio 更新到4.0版本后,在构建项目时使用 android.support.v7.XX android.support.v4.XX 发现在xml文件中,原先我最常使用的Dr ...
- android.support.design.widget.AppBarLayout 在android5.0+底部显示空白条问题
在最外层使用 RelativeLayout作为根节点,同时设置 android:fitsSystemWindows="true"问题解决. <?xml version=&qu ...
- 【转】Caused by: java.lang.NoClassDefFoundError: android.support.v7.gridlayout.R$dimen 异常解决方法
在使用gridlayout中遇到 Caused by: java.lang.NoClassDefFoundError: android.support.v7.gridlayout.R$dimen 问题 ...
随机推荐
- centos配置Tomcat以指定的身份(非root)运行
本文依赖的环境: 已安装并配置好jdk和tomcat环境 已安装并配置好gcc.make等编译工具 1.编译安装守护程序 cd /usr/local/tomcat7/bin/ tar vzxf c ...
- Linux系列-Xshell连接本地VMware安装的Linux虚拟机
一.安装VMwareWorkstation并安装RedHat虚拟机,这里安装步骤省略,网络的资料很多,大侠们不如百度或者谷歌一下,大把的资料. 二.打开本地电脑的“网络连接”,你会发现多出了2个网络适 ...
- windows dos 常用命令行
有关某个命令的详细信息,请键入 HELP 命令名 dir (directory) :列出当前目录下的文件以及文件夹 md (make directory): 创建目录 rd (remove direc ...
- nginx 下使用 bootstrap 字体的问题
使用boostrap时,出现 glyphicons-halflings-regular.ttf glyphicons-halflings-regular.woff glyphicons-halflin ...
- Python开发【模块】:sqlalchemy
一.对象映射关系(ORM) orm英文全称object relational mapping,就是对象映射关系程序,简单来说我们类似python这种面向对象的程序来说一切皆对象,但是我们使用的数据库却 ...
- HDU1698:Just a Hook(线段树区域更新模板题)
http://acm.hdu.edu.cn/showproblem.php?pid=1698 Problem Description In the game of DotA, Pudge’s meat ...
- (1)R介绍
1. R初窥 从CRAN(The Comprehensive R Archive Network)cran.r-project.org—mirrors.html中选择一个镜像,然后下载合适的安装包(R ...
- 破解NET的四大神器(转)
原文地址 原本这篇文章可以更早一星期写出来与大家分享,由于某方面的原因耽搁到现在,心里竟有那么一点好像对不住大家的感觉.这当然与神器有关,因为我发现利用这四大神器我似乎觉得几乎所有的NET程序破解都不 ...
- 11. Container With Most Water(装最多的水 双指针)
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). ...
- Arthur and Brackets
n<605设计出n对夸号 给出n个条件每个条件为[l,r] 表示第i对夸号右夸号离左夸号的距离,然后夸号的右夸号出现的顺序必须按照给的顺序 出现, 那么如果存在就输出否则输出impossilb ...