Hi,
I have a library which makes use of Rx and I am packing this library as an aar which can be used in other projects. I am able to generate the aar but when I try to access it in other projects, it throws
java.lang.NoClassDefFoundError: Failed resolution of: Lrx/Observer;
Caused by: java.lang.ClassNotFoundException: Didn't find class "rx.Observer" on path: DexPathList
Maybe I am writing the build.gradle wrong or not excluding some things. Any help is much appreciated.
My library's build.gradle looks like this
compile 'io.reactivex:rxandroid:1.0.1'
compile 'io.reactivex:rxjava:1.0.14'
Can we use Rx in a library project and export it as an aar? Any help is much appreciated.
If you publish the AAR to a Maven repository its pom will include the RxJava dependency. Otherwise you have to add the dependencies anywhere you manually import the AAR.