I have a project that uses RxJava 1. Now I'm building a module component, and thinking of starting with RxJava 2.
When perform gradle sync, all good. However during compilation I got the following error
Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForProductionDebug'. com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/rxjava.properties File1: /Users/user.name/.gradle/caches/modules-2/files-2.1/io.reactivex/rxjava/1.2.5/b423532b5a3c949cbb799468f83bf566032fe98d/rxjava-1.2.5.jar File2: /Users/user.name/.gradle/caches/modules-2/files-2.1/io.reactivex.rxjava2/rxjava/2.0.1/57f850a6b317e5582f1dbaff10a9e7d7e1fcdcfb/rxjava-2.0.1.jar
Is there anyway I could have them coexist in a single project (but different library), or this is a definitely no-no?
i.e. on one, I have
compile 'io.reactivex:rxjava:1.2.5'
compile 'io.reactivex:rxandroid:1.2.1'
on the other one I have
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'