小编A B*_*A B的帖子

java.lang.NoSuchMethodError: 没有虚拟方法 toString(Z)Ljava/lang/String; 在类 Lokhttp3/Cookie 中;或者它的超类

我在一个 Android 项目中使用了改造 (2.7.2) 和 OkHttp 版本 (4.4.0),但我在请求时遇到了崩溃。

依赖项:

kapt("com.squareup.moshi:moshi-kotlin-codegen:1.9.2")
implementation 'com.squareup.moshi:moshi:1.9.2'     
implementation 'com.squareup.retrofit2:retrofit:2.7.2'
implementation 'com.squareup.retrofit2:converter-moshi:2.7.2'

implementation("com.squareup.okhttp3:okhttp:4.4.0")
implementation("com.squareup.okhttp3:okhttp-tls:4.4.0")
implementation "com.squareup.okhttp3:logging-interceptor:4.4.0"
Run Code Online (Sandbox Code Playgroud)

碰撞:

java.lang.NoSuchMethodError: 没有虚拟方法 toString(Z)Ljava/lang/String; 在类 Lokhttp3/Cookie 中;或其超类('okhttp3.Cookie' 的声明出现在 /data/app/com.package-1/base.apk:classes3.dex 中)在 com.facebook 的 okhttp3.JavaNetCookieJar.saveFromResponse(JavaNetCookieJar.java:45) .react.modules.network.ReactCookieJarContainer.saveFromResponse(ReactCookieJarContainer.java:36) 在 okhttp3.internal.http.HttpHeaders.receiveHeaders(HttpHeaders.kt:207) 在 okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:85) ) 在 okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) 在 okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:74) 在 okhttp3.internal.http.RealInterceptorChain

java android retrofit okhttp react-native

9
推荐指数
2
解决办法
6650
查看次数

标签 统计

android ×1

java ×1

okhttp ×1

react-native ×1

retrofit ×1