In my android project ,I import fresco:
dependencies {
compile fileTree(include: '*.jar', dir: 'libs')
compile 'com.android.support:design:23.0.1'
compile 'com.android.support:recyclerview-v7:23.0.1'
compile('com.android.support:support-v4:22.2.1') {
exclude module: 'support-annotations'
}
compile('com.android.support:appcompat-v7:22.2.1') {
exclude module: 'support-annotations'
}
compile 'com.squareup.okhttp3:okhttp:3.2.0'
compile 'io.reactivex:rxjava:1.1.3'
compile 'io.reactivex:rxandroid:1.1.0'
compile 'com.facebook.stetho:stetho:1.3.1'
compile 'com.facebook.stetho:stetho-okhttp3:1.3.1'
compile 'com.facebook.fresco:fresco:1.0.0'
}
when I run the project, it was wrong:
java.lang.NoClassDefFoundError: rx.plugins.RxJavaPlugins at rx.Observable.<clinit>(Observable.java:63)
at com.xx.xx.MyService.initService(MyService.java:37)
at com.xx.xx.MyActivity.onCreate(MyActivity.java:99)
at android.app.Activity.performCreate(Activity.java:5293)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2154)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2250)
at android.app.ActivityThread.access$800(ActivityThread.java:139)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1200)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5049)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:818)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:634)
at dalvik.system.NativeStart.main(Native Method)
I do in MyServer
Observable.create(new Observable.OnSubscribe(){
@Override public void call(Object o) {
doSomeThing();
}
})
.subscribeOn(Schedulers.io())
.subscribe();
supplement:
in my SAMSUNG Galaxy S4 (GT-9500 ,Android 5.0.1) it is run well. in Android 4.4 (MIUI 7 ,Android 4.4.4) ,it's wrong.
finally, forgive me poor English.
Thanks!