并不是在项目下面加入android-support-v7-gridlayout.jar正确的使用方法如下:1 在SDK目录下的  \extras\android\support\v7下有 gridlayout 项目,是个library项目, 导入eclipse 稍微调试一下,就不报错了(附件就是)2  在自己的项目上右键-->属性-->android-->library里面添加上面的项目3  按照下面的demo使用就可以啦<android.support.v7.widget.GridLayout xmlns:android="http://schemas.android.com/apk/res/android"    xmlns:app="http://schemas.android.com/apk/res/com.example.androidtest"    android:layout_width="match_parent"    android:layout_height="wrap_content"    app:alignmentMode="alignBounds"    app:columnCount="3"    app:columnOrderPreserved="false"    app:rowCount="5"    app:useDefaultMargins="true" >    <TextView        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:layout_centerHorizontal="true"        android:layout_centerVertical="true"        app:layout_rowSpan="2"        android:text="@string/hello_world" />    <TextView        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:layout_centerHorizontal="true"        android:layout_centerVertical="true"        app:layout_rowSpan="1"        android:text="@string/hello_world" />    <TextView        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:layout_centerHorizontal="true"        android:layout_centerVertical="true"        app:layout_rowSpan="3"        android:text="@string/hello_world" />    <TextView        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:layout_centerHorizontal="true"        android:layout_centerVertical="true"        app:layout_rowSpan="1"        android:text="@string/hello_world" />    <TextView        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:layout_centerHorizontal="true"        android:layout_centerVertical="true"        app:layout_rowSpan="1"        android:text="@string/hello_world" /></android.support.v7.widget.GridLayout>

更多相关文章

  1. android attr.xml 怎么在主工程中设置library项目中背景或者其他
  2. Android下调试.so库类的bug
  3. android studio ,gradle 导入项目 常见错误 错误提示:Error:(2, 0)
  4. [置顶] 第8章android动态调试
  5. 【翻译】Android(安卓)Support Library
  6. Android(安卓)studio如何使用SVN进行版本控制?
  7. cordova + vue-cli构建跨平台应用
  8. 设置android编码格式与包的引入格式于源码一致
  9. 2017年Android开源项目及库汇总

随机推荐

  1. Flutter Android(安卓)打包发布
  2. android post 乱码问题
  3. 【handler】Android定时每十分钟执行一次
  4. android 中对apache httpclient及httpurl
  5. Android清理设备内存具体完整演示样例(一
  6. android拍照,调用系统相册,相片上传
  7. Android api对应版本(持续更新)
  8. Android窗体自定义标题栏
  9. Android之Bluetooth编程
  10. android P-sensor (Proximity Sensor)