V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
haydenjie
V2EX  ›  Android

Android 11 系统上 Okhttp 3.10 版本上部分手机出现 Java .lang.VerifyError:Superclass okhttp3.internal.http1.Http1Codec$AbstractSource

  •  
  •   haydenjie · 2021-01-06 17:36:45 +08:00 · 8830 次点击
    这是一个创建于 1442 天前的主题,其中的信息可能已经有所发展或是发生改变。
    Caused by:
    5 java.lang.VerifyError:Superclass okhttp3.internal.http1.Http1Codec$AbstractSource of okhttp3.internal.http1.Http1Codec$UnknownLengthSource is declared final (declaration of 'okhttp3.internal.http1.Http1Codec$UnknownLengthSource'

    appears in /data/app/~~7Slsz0eTU_atlqLyl7NGKQ==/com.zhenhui.huilianyi-5gJPwjBAIcieNSC9WYPr4g==/base.apk)
    6 okhttp3.internal.http1.Http1Codec.f(Http1Codec.java:259)
    7 okhttp3.internal.http1.Http1Codec.a(Http1Codec.java:153)
    8 okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:124)
    9 okhttp3.internal.http.RealInterceptorChain.a(RealInterceptorChain.java:147)
    10 okhttp3.internal.http.RealInterceptorChain.a(RealInterceptorChain.java:121)
    11 com.huilianyi.hlybaselibrary.http.HttpClientManager$1.intercept(HttpClientManager.java:39)
    12 okhttp3.internal.http.RealInterceptorChain.a(RealInterceptorChain.java:147)
    13 okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
    14 okhttp3.internal.http.RealInterceptorChain.a(RealInterceptorChain.java:147)
    15 okhttp3.internal.http.RealInterceptorChain.a(RealInterceptorChain.java:121)
    16 okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
    17 okhttp3.internal.http.RealInterceptorChain.a(RealInterceptorChain.java:147)
    18 okhttp3.internal.http.RealInterceptorChain.a(RealInterceptorChain.java:121)
    19 okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
    20 okhttp3.internal.http.RealInterceptorChain.a(RealInterceptorChain.java:147)
    21 okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:126)
    22 okhttp3.internal.http.RealInterceptorChain.a(RealInterceptorChain.java:147)
    23 okhttp3.internal.http.RealInterceptorChain.a(RealInterceptorChain.java:121)
    24 com.huilianyi.hlybaselibrary.http.intercept.HttpInterceptor.intercept(HttpInterceptor.java:63)
    25 okhttp3.internal.http.RealInterceptorChain.a(RealInterceptorChain.java:147)
    26 okhttp3.internal.http.RealInterceptorChain.a(RealInterceptorChain.java:121)
    27 okhttp3.RealCall.i(RealCall.java:200)
    28 okhttp3.RealCall.b(RealCall.java:77)
    29 retrofit2.OkHttpCall.execute(OkHttpCall.java:180)
    30 retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$RequestArbiter.request(RxJavaCallAdapterFactory.java:171)
    31 rx.internal.operators.OperatorSubscribeOn$1$1$1.request(OperatorSubscribeOn.java:80)
    32 rx.Subscriber.setProducer(Subscriber.java:209)
    33 rx.internal.operators.OperatorSubscribeOn$1$1.setProducer(OperatorSubscribeOn.java:76)
    34 rx.Subscriber.setProducer(Subscriber.java:205)
    35 retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$CallOnSubscribe.call(RxJavaCallAdapterFactory.java:152)
    36 retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$CallOnSubscribe.call(RxJavaCallAdapterFactory.java:138)
    37 rx.internal.operators.OnSubscribeLift.a(OnSubscribeLift.java:50)
    38 rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
    39 rx.Observable.a(Observable.java:8666)
    40 rx.internal.operators.OperatorSubscribeOn$1.call(OperatorSubscribeOn.java:94)
    41 rx.internal.schedulers.CachedThreadScheduler$EventLoopWorker$1.call(CachedThreadScheduler.java:220)
    42 rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
    43 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
    44 java.util.concurrent.FutureTask.run(FutureTask.java:266)
    45 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
    46 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    47 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    48 java.lang.Thread.run(Thread.java:923)
    2 条回复    2021-01-08 16:14:07 +08:00
    chenjiajia9411
        1
    chenjiajia9411  
       2021-01-07 09:21:34 +08:00
    混淆有问题,AbstractSource 给弄成 final 了,把 allowaccessmodification 关了,以后上传的日志最好也带上符号表或者直接还原不然不方便看。
    还有如果还需要兼容 API 21 以下就把 OkHttp 升级到 3.12.12 ,不需要兼容的话直接升级到 4.9.0 吧。
    haydenjie
        2
    haydenjie  
    OP
       2021-01-08 16:14:07 +08:00
    我看了一下这个 allowaccessmodification 这个配置工程里面没有,但是在 build 里面生成的配置文件里面找了这个,这个配置好像只会把 private 变成 public 。 现在是 bugly 上统计到部分 Android11 的手机出现,我找相同的手机却不能出现这个报错。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   4078 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 18ms · UTC 00:59 · PVG 08:59 · LAX 16:59 · JFK 19:59
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.