I use both rxjava / rxandroid and jackson-databind in my application, but it seems that both libraries cannot work together. When I try to run my application, it returns the following error:
java.lang.ClassNotFoundException: rx.android.schedulers.AndroidSchedulers
here is my gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "myapp"
minSdkVersion Integer.parseInt(project.ANDROID_MIN_SDK_VERSION)
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE'
}
lintOptions {
abortOnError false
}
}
repositories {
mavenCentral()
flatDir {
dirs 'libs'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.pspdfkit:pspdfkit:2.0.1@aar'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.google.guava:guava:19.0'
compile 'org.lucasr.twowayview:twowayview:0.1.4'
compile 'com.joanzapata.pdfview:android-pdfview:1.0.2@aar'
compile 'net.lingala.zip4j:zip4j:1.3.2'
compile 'com.github.chrisbanes.photoview:library:1.2.4'
compile 'com.makeramen:roundedimageview:2.2.1'
compile 'com.github.bumptech.glide:glide:3.6.1'
compile 'ch.acra:acra:4.7.0'
compile 'io.reactivex:rxjava:1.1.0'
compile 'io.reactivex:rxandroid:1.1.0'
compile ('com.koushikdutta.ion:ion:2.+') {
exclude (group: 'com.google.code.gson')
}
compile (project (':common'))
}
inside the general project there is a Jackson dependency that makes the application produce this error:
compile 'com.fasterxml.jackson.core:jackson-databind:2.7.0-rc2'
Has anyone had this problem? Is there a simple solution?
source
share