我最近在我的项目中添加了 SDK;但不幸的是,我不能再使用RxJava了,它会导致重复的异常。值得一提的是,在将SDK添加到项目之前,一切都正常工作。
下面是堆栈跟踪:
Duplicate class io.reactivex.BackpressureStrategy found in modules rxjava-2.0.4.jar (io.hengam.lib:rxjava:2.0.4) and rxjava-2.2.9.jar (io.reactivex.rxjava2:rxjava:2.2.9)
Duplicate class io.reactivex.Completable foun
rxjava2依赖与rxkotlin依赖有什么区别?如果我使用的是rxkotlin依赖项,那么是否需要同时添加rxjava2依赖项。
implementation 'io.reactivex.rxjava2:rxkotlin:x.y.z'
// do i need to add the below dependencies also?
implementation 'io.reactivex.rxjava2:rxjava:2.2.4'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
我试图在RxAndroid中使用Retrofit,所以我导入了所需的依赖项,如下所示。但是,当我运行应用程序时,我会收到以下错误:
Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK ME
报错信息:
Unable to resolve dependency for ':app@debug/compileClasspath': Could not download rxjava.jar (io.reactivex.rxjava2:rxjava:2.2.0)
Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not download rxjava.jar (io.reactivex.rxjava2:rxjava:2.2.0)
Unable
发出onNext值时的OnError: com.couchbase.client.java.document.json.JsonObject.class
at rx.exceptions.OnErrorThrowable.addValueAsLastCause(OnErrorThrowable.java:118) ~[rxjava-1.3.8.jar:1.3.8]
at rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:73) ~[rxjava-1.3.8