recyclerview加载报错,NoClassDefFound
来源:互联网 发布:蘑菇街软件下载 编辑:程序博客网 时间:2024/04/29 21:50
转载请注明出处,谢谢http://blog.csdn.net/harryweasley/article/details/50467425
最近工作清闲,好不容易想学习一下Android一个新控件RecyclerView的特性,但就是在我运用RecyclerView的时候,eclipse运行时总是报错,
Caused by: java.lang.NoClassDefFoundError: android.support.v7.recyclerview.R$styleable
网上搜索了一番,也没有找到解决方法,这也太打击用户学习积极性了吧。
现在我将解决方法写出来,希望帮到更多的人。
建议大家在使用Google的Android Support Library时,不要采用直接将../sdk/extras/android/support/v7/recyclerview复制到libs目录,这种方式。我反正是用这种方式,一直报noClassDefFound错误。
用下面的这个方法,就不会报错了。
1.eclipse import SDK下的recyclerview,路径是:…\sdk\extras\android\support\v7\recyclerview,
2.在eclipse中对着该lib项目右击,选中properties -> android,选上is library,
3.最后在你要用到recyclerview的项目同样右击中properties -> android-> add, 添加你刚刚的recyclerview作为该项目的library
1 0
- recyclerview加载报错,NoClassDefFound
- IDEA Spark 程序报错: NoClassDefFound : Scala/xml/metadata
- android的 adt 升级18后,使用三方jar包,报错:NoClassDefFound或VerifyError
- RecyclerView 报错问题
- recyclerview notifyItemRemoved报错
- 引入recyclerview报错问题
- RecyclerView中的坑RecyclerView$LayoutManager.stopSmoothScroller()报错
- Android 使用RecyclerView 报错NoSuchMethodError
- 关于继承RecyclerView.Adapter报错
- NoClassDefFound 异常
- NoClassDefFound解决方法
- EventBus NoClassDefFound
- 懒加载报错
- RecyclerView 报空指针
- RecyclerView实现加载更多
- RecyclerView简易加载更多
- RecyclerView加载间距
- RecyclerView+OkHttp加载刷新
- 微信(移动端web)开发中的一些坑与心得
- git修改远程仓库地址
- 封装的自定义dialog,文本编辑,EditText,按需更改
- 11 个让你吃惊的 Linux 终端命令-转
- 3.2 Git 分支 - 分支的新建与合并
- recyclerview加载报错,NoClassDefFound
- Android手动显示或隐藏软键盘
- C#逻辑运算符详解
- MyBits的使用心得
- untiy3d 集成友盟 SocialSDK 分享功能 记录
- g++ 5编译链接lib时遇到的问题
- HTML+CSS+JScript
- SecureCRT的使用
- http请求417错误