Android : 异常记录

查询大数据时 报错

android.database.sqlite.SQLiteBlobTooBigException: Row too big to fit into CursorWindow requiredPos=0, totalRows=1


解决办法:
  cursor = DB.rawQuery("select * from "+ DBhelpUtil.TABLE_NAME+" where id =?",new String[]{id+""});
        
// 解决报错;android.database.sqlite.SQLiteBlobTooBigException: Row too big to fit into CursorWindow requiredPos=0, totalRows=1

 // 设置CursorWindow的大小为5000000
CursorWindow cw = new CursorWindow("test", 5000000);
AbstractWindowedCursor ac = (AbstractWindowedCursor) cursor;
ac.setWindow(cw);

没有读、写配置权限

 Process: com.example.mygetdata, PID: 21370

java.lang.SecurityException: Permission Denial: opening provider 

com.android.providers.contacts.ContactsProvider2 from ProcessRecord{a76da5b 

21370:com.example.mygetdata/u0a266} (pid=21370, uid=10266) requires 

android.permission.READ_CONTACTS or android.permission.WRITE_CONTACTS
                                                                                                    

数组适配器 里面只能是 TextView

Process: com.example.mygetdata, PID: 11963 
java.lang.IllegalStateException:
 ArrayAdapter requires the resource ID to be a TextView
                                                                                                    

每个线程只能创建一个Looper

 java.lang.RuntimeException:
 Unable to start receiver com.example.mygpsalert.MyReceiver:
 java.lang.RuntimeException: Only one Looper may be created per thread

uid冲突

java.lang.SecurityException: 
Specified package com.example.mygpsalert under uid 10620 but it is really 10621

这个异常的意思是指定的包名com.example.mygpsalert的UID是10620,但实际上它的UID是10621,
因此出现了Binder权限问题。这通常是由于应用程序在安装后被更新或重新安装导致的。
在这种情况下,系统会为应用程序分配一个新的UID,但是应用程序中的某些组件
(如ContentProvider)可能仍然使用旧的UID,从而导致权限问题。

解决这个问题的方法是:
卸载并重新安装应用程序,
或者在应用程序中更新使用UID的组件,以便它们使用正确的UID。
或者卸载之前应用 重启手机 再次安装

子线程中不能操作UI

Accessibility content change on non-UI thread. 
Future Android versions will throw an exception.
                                                                                                    android.view.ViewRootImpl$CalledFromWrongThreadException:
 Only the original thread that created a view hierarchy can touch its views.

继续记录中...

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

javaGHui

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值