kotlin bug: Parameter specified
kotlin bug: java.lang.IllegalArgumentException: Parameter specified as non-null is null
错误日志
E/CrashHandler: In thread: Thread[main,5,main]
UncaughtException detected: java.lang.IllegalStateException: Fatal Exception thrown on Scheduler.
at io.reactivex.android.schedulers.HandlerSchedulerMethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:793)
Caused by: java.lang.IllegalArgumentException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter object
at io.reactivex.internal.operators.observable.ObservableObserveOnObserveOnObserver.run(ObservableObserveOn.java:252)
at io.reactivex.android.schedulers.HandlerSchedulerMethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:793)
代码:
RetrofitApi.getInstance().saveLocationMsg(regionProvinceId, regionCityId, regionAreaId, purchaseName, purchasePhone, userAddress).
subscribeOn(Schedulers.io()).
observeOn(AndroidSchedulers.mainThread()).
subscribe(object : RxSubcriber<Any>() {
override fun onSuccess(t: Any?) {
if (isViewAttached) {
mMvpView.saveCallBack(t)
}
}
override fun onError(e: Throwable?) {
if (isViewAttached) {
}
super.onError(e)
}
})
}