gradle - Didn't find the class rx.android.schedulers.AndroidSchedulers -


i'm using both rxjava/rxandroid , jackson-databind in application seems 2 libraries can't work together. when try run application returns following error:

java.lang.classnotfoundexception: rx.android.schedulers.androidschedulers 

here 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 common project there's jackson dependency making app produces error:

compile 'com.fasterxml.jackson.core:jackson-databind:2.7.0-rc2' 

somebody had problem? there easy solution?

the problem comes using rxandroid , multidex support. solution worked me adding android:name="android.support.multidex.multidexapplication" @ application level in manifest.

if have android:name=".myapp", override attachbasecontext() method

@override protected void attachbasecontext(context base) {     super.attachbasecontext(base);     multidex.install(this); } 

all these suggestions come

http://developer.android.com/tools/building/multidex.html


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -