无法在android.support.v7.widget.GridLayout中使用columnCount属性

时间:2016-03-08 11:49:11

标签: android widget android-support-library grid-layout android-library

我正在尝试使用android.support.v7.widget.GridLayout中的 columnCount 属性,但收到错误

错误:(2)在包中找不到属性'useDefaultMargins'的资源标识符

我使用了xmlns:app="http://schemas.android.com/apk/res-auto

1 个答案:

答案 0 :(得分:4)

尝试更改:

xmlns:app="http://schemas.android.com/apk/res-auto" 

xmlns:app="http://schemas.android.com/apk/lib/com.package.class"

将您的资料库更新为

compile 'com.android.support:gridlayout-v7:23.2.0'

检查this回答。