LoginSignup
9
3

More than 5 years have passed since last update.

RxJavaとRxJava 2を混在させる時に書くもの

Posted at

2016/12/4現在、RxBindingはRxJava 2未対応です。
それでもRxJava 2化したい場合、RxJavaとRxJava 2を混在せることになります。

混在させるとBuild APK時に以下のエラーが出ます。

com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/rxjava.properties

以下をモジュール個別のbuild.gradleに追加すると、エラーが出なくなります。

build.gradle
packagingOptions {
    exclude 'META-INF/rxjava.properties'
}

参考元
2.x_ Duplicated file rxjava.properties · Issue #4445 · ReactiveX_RxJava
https://github.com/ReactiveX/RxJava/issues/4445

9
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
3