Using RxJava 2 and Retrofit 2, adapter version issue
<p>I've added a new library module to existing application module in Android Studio. The main difference was adding RxJava 2 and Retrofit 2.
After updating build.gradle of new module I started to get next error:</p>

<blockquote>
  <blockquote>
    <p>Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForBetaNewApiDebug'.
        com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files
    copied in APK META-INF/rxjava.properties  File1:
    C:\Users\Gaket.gradle\caches\modules-2\files-2.1\io.reactivex.rxjava2\rxjava\2.0.2\cfccdd18cdfbe7b4773d42c9f3512eeafbe5cbf9\rxjava-2.0.2.jar
      File2:
    C:\Users\Gaket.gradle\caches\modules-2\files-2.1\io.reactivex\rxjava\1.1.5\ece7b5d0870e66d8226dab6dcf47a2b12afff061\rxjava-1.1.5.jar</p>
  </blockquote>
</blockquote>

<p>I see that there is some problem with RxJava (I want to try RxJava 2 and here I see both RxJava 1 and RxJava 2). The problem arises right after adding all dependencies, we do not use <code>RxJava</code> in our main application.</p>

<p><strong>Update:</strong>
As I mentioned below, I checked three topics (you can see it below). This issue: <a href="https://stackoverflow.com/questions/33923461/how-do-i-resolve-duplicate-files-copied-in-apk-meta-inf">possible duplicate</a> is similar to the one that I already mention below:  <a href="https://stackoverflow.com/questions/38811753/duplicate-files-copied-in-apk-meta-inf-on-many-libraries">this one</a>. Both of them have workarounds that do not take into account the real problem that I underlined in my answer. And the <em>answer is</em> "There is no production-ready adapter from Retrofit 2 to RxJava 2 at the moment" (full details described in answer below).</p>

<p>I checked several topics: <a href="https://stackoverflow.com/questions/34282190/android-studio-1-5-1-duplicate-files-copied-in-apk-meta-inf-notice-txt-commons-c">first</a>  is some concrete solution for a concrete problem, <a href="https://stackoverflow.com/questions/40371315/migrate-from-rxandroid-1-x-to-2-x-rxjava-included">second</a> talks about <code>rxbindings</code>, but I don't use them, some others also have not resolved my problem or look like total workarounds <a href="https://stackoverflow.com/questions/38811753/duplicate-files-copied-in-apk-meta-inf-on-many-libraries">this one</a>. I tried to google "rxjava 2 and retrofit 2" but haven't found a solution.</p>

<p>Here is the <code>build.gradle</code> of library:</p>

<pre><code>apply plugin: 'com.android.library'
apply plugin: 'com.jakewharton.butterknife'

android {
compileSdkVersion 25
buildToolsVersion "25.0.0"

defaultConfig {
    minSdkVersion 15
    targetSdkVersion 24
    versionCode 1
    versionName "1.0"

    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}



dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',      {
    exclude group: 'com.android.support', module: 'support-annotations'
})

compile "com.android.support:appcompat-v7:$supportLibraryVersion"
compile "com.android.support:recyclerview-v7:$supportLibraryVersion"

compile 'io.reactivex.rxjava2:rxjava:2.0.2'
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
compile 'com.squareup.okhttp3:okhttp:3.5.0'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
compile "com.makeramen:roundedimageview:1.3.0"

annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
provided 'javax.annotation:jsr250-api:1.0'
compile 'com.jakewharton:butterknife:8.4.0'

testCompile 'junit:junit:4.12'

}
</code></pre>

<p>The question is:<br>
  Why does this problem happen and what is the proper way to handle it?</p>