liujingxing / rxhttp

🔥🔥🔥 Based on OkHttp encapsulation, support Kotlin Coroutines、RxJava2、RxJava3; 30s to get started.
https://juejin.im/post/5ded221a518825125d14a1d4
Apache License 2.0
3.74k stars 457 forks source link

闪退问题,java.lang.NoSuchFieldError #457

Closed xuegao-tzx closed 1 year ago

xuegao-tzx commented 1 year ago

具体日志:

java.lang.NoSuchFieldError: No field Companion of type Lrxhttp/wrapper/param/RxHttp$Companion; in class Lrxhttp/wrapper/param/RxHttp; or its superclasses (declaration of 'rxhttp.wrapper.param.RxHttp' appears in /data/app/~~WVAd3gIT1M1mJTpDa9hgUQ==

Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@cbf6fd7, Dispatchers.IO]
RxHttp.postJson("/test")
      .add("country", verify.country)
      .toAwait<XCLApiBean.VerifyInfo>()
      .tryAwait()
liujingxing commented 1 year ago

怎么接入的?rxhttp-compiler有没有依赖多次?

xuegao-tzx commented 1 year ago

怎么接入的?rxhttp-compiler有没有依赖多次?

implementation("com.github.liujingxing.rxhttp:rxhttp:3.1.1") ksp("com.github.liujingxing.rxhttp:rxhttp-compiler:3.1.1")

liujingxing commented 1 year ago

就这,没其他得了?

xuegao-tzx commented 1 year ago

就这,没其他得了?

还有基础的okhttp3的依赖 com.squareup.okhttp3:okhttp

liujingxing commented 1 year ago

一般这个问题是多个module依赖了rxhttp-compiler导致的,检查下

xuegao-tzx commented 1 year ago

好的

liujingxing commented 1 year ago

问题解决了吗

q947721485 commented 7 months ago

java.lang.NoSuchFieldError: No field Companion of type Lrxhttp/wrapper/param/RxHttp$Companion; in class Lrxhttp/wrapper/param/RxHttp; or its superclasses (declaration of 'rxhttp.wrapper.param.RxHttp' appears in /data/app/~~WKe7naLd7ecjnJoA3eKrWQ==/com.xishidaojia.fuwu-XHrp4duSyPJkNugOeeDssA==/base.apk!classes10.dex) 环境 使用ksp编译 版本3.2.3 ksp版本 1.9.20-1.0.14 无多module依赖 在compose 目前不知道具体问题在什么地方

liujingxing commented 7 months ago

480