Android 解决attempt to acquire a reference on a close SQLiteClosable
2015-07-14 17:15
573 查看
1、最基本的可能是操作不当,访问已经关闭的数据库,这中原因检查一下代码就能解决。
2、使用完Cursor后没有关闭。Cursor一定要使用完立刻关闭(我的就是这问题,项目前期就发现了当时没怎么在意,后来就只能加班改代码了)。
3、还有国外的朋友认为可能是Android会不定时的吧旧对象回收掉,每次操作数据库应该用新对象,而不要用就对象了(E文不好不知道对不对)。
http://stackoverflow.com/questions/1483629/exception-attempt-to-acquire-a-reference-on-a-close-sqliteclosable
2、使用完Cursor后没有关闭。Cursor一定要使用完立刻关闭(我的就是这问题,项目前期就发现了当时没怎么在意,后来就只能加班改代码了)。
3、还有国外的朋友认为可能是Android会不定时的吧旧对象回收掉,每次操作数据库应该用新对象,而不要用就对象了(E文不好不知道对不对)。
http://stackoverflow.com/questions/1483629/exception-attempt-to-acquire-a-reference-on-a-close-sqliteclosable
相关文章推荐
- Android 解决Android requires compiler compliance level 5.0 or 6.0. Found '1.7'
- UI4_UITableViewSectionIndex
- UI3_UITableViewDelete(多选)
- UI2_UITableViewDelete
- Leetcode_95 Unique Binary Search Trees II
- What's the difference between all the Selection Segues?
- iOS UITableView Cell动态高度(使用AutoLayout)
- UISwitch学习记录
- SUI
- iOS开发笔记--如何去掉UItableview header(footer)view黏性(sticky)
- StringBuilder与StringBuffer的区别
- Android开发UI之常用控件的使用
- Sublime Text Build System——编译运行Java
- iOS开发概述UIkit动力学
- Gradle DSL method not found: 'zipAlign()'/'runProguard()'/'jniDebugBuild()'/ 'renderscriptDebug()'
- Builder模式(创建类)
- EasyUI实现二级页面的内容勾选的方法
- Funambol Developer's Guide 中 connector development例子的问题
- 【一步一步的积累】Synthetic Minority Over-sampling TEchnique
- ios UIView的clipsTobounds属性