SQLite和RecyclerView使用过程中两处报错记录

本文探讨了Android应用程序中出现的数据库访问错误,包括Couldn't read row 0,col-1 from CursorWindow的问题根源及解决方案。文章指出,在某些情况下,需要删除并重新安装应用程序才能解决问题,并提到了与Android数据库操作、RecyclerView版本兼容性等相关的技术细节。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Couldn't read row 0, col -1 from CursorWindow.  
Make sure the Cursor is initialized correctly before accessing data from it.

应用安装以后数据库不会再创建,helper的oncreate方法不会调用,在插入字段时,报上述错误,需要删除应用,重新启动安装。

java.lang.NoSuchMethodError: No static method getFont(Landroid/content/Context;ILandroid/util/TypedValue;ILandroid/widget/TextView;)Landroid/graphics/Typeface; in class Landroid/support/v4/content/res/ResourcesCompat; 
or its super classes (declaration of 'android.support.v4.content.res.ResourcesCompat' appears in /data/app/com.wyx.android.beatbox-2/base.apk)

RecyclerView的版本与当前编译或者AppCompat支持库的版本不一致,版本超前,需要手动修改降低RV版本或者提高sdk版本。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值