token 分支
Opened this issue · 0 comments
在token分至下 如果在接口请求成功后 比如在demo中login接口调用成功返回onSuccess方法中 ,立即调用方法finish(),会提示错误。
Activity com.cypoem.retrofit.activity.MainActivity has leaked window DecorView@a726516[MainActivity] that was originally added here
at android.view.ViewRootImpl.(ViewRootImpl.java:642)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:388)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:96)
at android.app.Dialog.show(Dialog.java:342)
at com.zhpan.idea.dialog.DialogUtils.showProgress(DialogUtils.java:48)
at com.zhpan.idea.net.common.ProgressUtils.applyProgressBar(ProgressUtils.java:26)
at com.zhpan.idea.net.common.ProgressUtils.applyProgressBar(ProgressUtils.java:46)
at com.zhpan.idea.utils.RxUtil.lambda$rxSchedulerHelper$0(RxUtil.java:29)
at com.zhpan.idea.utils.-$$Lambda$RxUtil$tK09HFjluVy9EQUFbtyIdFIlXfo.apply(Unknown Source:4)
at io.reactivex.Observable.compose(Observable.java:6283)
at com.cypoem.retrofit.activity.MainActivity.login(MainActivity.java:37)
at java.lang.reflect.Method.invoke(Native Method)
at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:288)
at android.view.View.performClick(View.java:7201)
at android.view.View.performClickInternal(View.java:7170)
at android.view.View.access$3500(View.java:806)
at android.view.View$PerformClick.run(View.java:27562)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7682)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:516)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)