smart-show
smart-show copied to clipboard
单例toast 怎么解决android8.0以上has already been added to the window manager的问题呢
Fatal Exception: java.lang.IllegalStateException: View android.widget.LinearLayout{53bc9d9 V.E...... ......ID 0,0-135,85} has already been added to the window manager. at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:328) at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:94) at android.widget.Toast$TN.handleShow(Toast.java:520) at android.widget.Toast$TN$1.handleMessage(Toast.java:424) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:192) at android.app.ActivityThread.main(ActivityThread.java:6792) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:826)
+1 红米6 8.0必现
使用的最新版
先用2.7.4版本看看是否还存在该问题,有的话,微信进一步交流
使用的最新版
这个兄弟有必现的手机吗?我这里复现不了,能帮忙测试一下吗
@the-pig-of-jungle 我试了2.7.4不崩了
@the-pig-of-jungle 然后有了新的bug Caused by: java.lang.ClassCastException: android.view.ViewRootImpl cannot be cast to android.view.ViewGroup at com.coder.zzq.smartshow.toast.BaseToastManager.showToast(BaseToastManager.java:108) at com.coder.zzq.smartshow.toast.PlainToastManager.showHelper(PlainToastManager.java:207) at com.coder.zzq.smartshow.toast.PlainToastManager.show(PlainToastManager.java:139) at com.coder.zzq.smartshow.toast.SmartToast.show(SmartToast.java:20)
已修复
已修复
怎么修复的?