尝试将RxPresso(https://github.com/novoda/rxpresso/)添加到我的项目时收到此错误消息:
Warning:Conflict with dependency 'io.reactivex:rxjava'. Resolved versions for app (1.1.9) and test app (1.0.14) differ. See http://g.co/androidstudio/app-test-app-conflict for details.
我目前正在使用rxjava 1.1.9。如何在我的项目中添加RxPresso?
很多
答案 0 :(得分:1)
您可以通过添加到build.gradle
下一个代码段
configurations.all {
// check dependency tree with gradlew :app:dependencies
// avoid wildcard '+' dependencies used at 3rd libraries forcing them to exact version
resolutionStrategy.force "io.reactivex:rxjava:1.1.9"
}
答案 1 :(得分:1)
为避免RxJava和Android支持库版本出现任何问题,请转到app/build.gradle
文件并在dependencies
部分粘贴:
androidTestCompile ('com.novoda:rxpresso:0.2.0') {
exclude group: 'com.android.support', module: 'support-annotations'
exclude group: 'io.reactivex'
}