复现步骤是这样的,进入MainActivity后点击Fab进入BatteryActivity,然后RecyclerView中的任意一个item进入WebActivity,按返回键返回,这时LogCat中会报这样的日志
1973-1973/com.smartalk.gank E/ActivityThread: Activity com.smartalk.gank.ui.activity.WebActivity has leaked ServiceConnection com.android.org.chromium.com.googlecode.eyesfree.braille.selfbraille.SelfBrailleClient$Connection@8899edf that was originally bound here
android.app.ServiceConnectionLeaked: Activity com.smartalk.gank.ui.activity.WebActivity has leaked ServiceConnection com.android.org.chromium.com.googlecode.eyesfree.braille.selfbraille.SelfBrailleClient$Connection@8899edf that was originally bound here
at android.app.LoadedApk$ServiceDispatcher.(LoadedApk.java:1072)
at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:966)
at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1776)
at android.app.ContextImpl.bindService(ContextImpl.java:1759)
at android.content.ContextWrapper.bindService(ContextWrapper.java:538)
at android.content.ContextWrapper.bindService(ContextWrapper.java:538)
at com.android.org.chromium.com.googlecode.eyesfree.braille.selfbraille.SelfBrailleClient.doBindService(SelfBrailleClient.java:125)
at com.android.org.chromium.com.googlecode.eyesfree.braille.selfbraille.SelfBrailleClient.access$1000(SelfBrailleClient.java:43)
at com.android.org.chromium.com.googlecode.eyesfree.braille.selfbraille.SelfBrailleClient$SelfBrailleHandler.handleRebindService(SelfBrailleClient.java:260)
at com.android.org.chromium.com.googlecode.eyesfree.braille.selfbraille.SelfBrailleClient$SelfBrailleHandler.handleMessage(SelfBrailleClient.java:245)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
我在项目中添加LeakCanary依赖,重复以上步骤时也会报存泄露的问题,个人猜测是使用WebView的问题,因为我之前对WebView了解的不多,网上也没有找到对这个log的详细说明和解决方案,请问该如何解决?谢谢!