android support v7 gridlayout,android.support.v7.widget.GridLayout无法让它工作

我有一个Android项目,它在大多数菜单和屏幕中使用GridLayout。然而,问题是GridLayout是从API 14及以后支持的。

由于我想将应用程序提供给旧版本的Android,所以我尝试使用Android自己的支持库GridLayout,它增加了API 7的支持。

这正是我正在寻找的,但是我不能为了我的生活让它工作。我已经尝试了所有这些解释和想法:

和更多…

无论我做什么,我如何做,或者我使用什么IDE(不管是Eclipse ADT还是Android Studio),它总是给我一个错误的布局XML中的以下行:

The following classes could be instantiated: - android.support.v7.widget.GridLayout

With either one of these exceptions showing in the error log:

1. android.content.res.Resources$NotFoundException: Could not resolve value 0x7F080000

2. java.lang.classnotfoundexception: android.support.v7.gridlayout.R$dimen

编辑:为了参考,这是我用来创建支持gridlayout(直接从android示例程序中获取):

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

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

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:background="@drawable/blue"

android:padding="10dip"

app:columnCount="4"

>

android:text="@string/string_test"

/>

app:layout_gravity="fill_horizontal"

app:layout_column="0"

app:layout_columnSpan="4"

/>

android:text="@string/button_test"

app:layout_column="2"

/>

我可能做错了什么,上述解决方案都不行吗?有没有我错过的东西,也许我的原始代码有问题?

任何帮助是赞赏

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值