I am seeing this IllegalStateException crash in Toast on Android 8.0 and 8.1 in the field. Devices: LGE LG Stylo 4 (cv7a), Android 8.1, Huawei Mate 10 Pro (HWBLA), Android 8.0.
Seems to bear many similarities to android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@b0baaa1 is not valid; is your activity running?
but a different exception. Sounds like it cannot be fixed with try/catch in your own code. Anyone else run across this or have a fix? (Note: I suspect the replacement toastCompat library mentioned at above link may work, but I have not tried it yet).
java.lang.IllegalStateException:
at android.view.WindowManagerGlobal.addView (WindowManagerGlobal.java:349) at android.view.WindowManagerImpl.addView (WindowManagerImpl.java:94) at android.widget.Toast$TN.handleShow (Toast.java:574) at android.widget.Toast$TN$1.handleMessage (Toast.java:477) at android.os.Handler.dispatchMessage (Handler.java:106) at android.os.Looper.loop (Looper.java:164) at android.app.ActivityThread.main (ActivityThread.java:6651) 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:810)