Android常见错误汇集

1. 

Caused by: java.lang.ClassNotFoundException: Didn't find class "android.os.PersistableBundle" on path: DexPathList[[zip file "/data/app/cn.aiguanggao.app-1.apk", zip file "/data/data/cn.aiguanggao.app/code_cache/secondary-dexes/cn.aiguanggao.app-1.apk.classes2.zip"],nativeLibraryDirectories=[/data/app-lib/cn.aiguanggao.app-1, /vendor/lib, /system/lib]]

原因:方法数超64K,分包出现问题,

 dexOptions {
//            incremental true
            jumboMode = true//todo 这是我加的
            javaMaxHeapSize "4g"
 }

引入流程写的时候出现问题,详情见

https://blog.csdn.net/daitu_liang/article/details/72987378

2. 

Caused by: java.net.SocketTimeoutException: timeout 
 at okio.k$4.newTimeoutException(Unknown Source) 
at okio.a.exit(Unknown Source) at okio.a$2.read(Unknown Source)
at okio.m.a(Unknown Source)
at okio.m.c(Unknown Source)
at okio.m.s(Unknown Source)
at okhttp3.internal.http1.Http1Codec.readResponseHeaders(Unknown Source)
at okhttp3.internal.http.CallServerInterceptor.intercept(Unknown Source)
at okhttp3.internal.http.RealInterceptorChain.proceed(Unknown Source)
at okhttp3.internal.http.RealInterceptorChain.proceed(Unknown Source)
at me.jessyan.progressmanager.b$1.intercept(Unknown Source)

原因: 加上下面这些代码即可

okhttpBuilder.writeTimeout(10,TimeUnit.SECONDS).connectTimeout(10,TimeUnit.SECONDS).retryOnConnectionFailure(true);

3.

Channel is unrecoverably broken and will be disposed

原因:将硬件加速去掉,把下面这行代码去掉即可,位置在AndroidManifest的application节点上

android:hardwareAccelerated="true"

4.

Build fingerprint: \'SUGAR/v12bn/v12bn:7.1.2/N2G47H/androi11102246:user/release-keys\'
Revision: \'0\'
ABI: \'arm\'
 pid: 26752, tid: 26752, name: .aiguanggao.app >>> cn.aiguanggao.app <<<

原因:未添加对应架构的支持,解决方法如下:

  ndk {
//            abiFilters "armeabi", "armeabi-v7a", "x86", "mips"
            abiFilters "armeabi", "armeabi-v7a", "x86", "mips","arm64-v8a","mips64","x86_64"
        }

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值