如题
android.view.WindowManager$BadTokenException: Unable to add window – token android.view.ViewRootImpl$W@40e2d8 is not valid; is your activity running?
at android.view.ViewRootImpl.setView(ViewRootImpl.java:1593)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:509)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:133)
at android.widget.PopupWindow.invokePopup(PopupWindow.java:1688)
at android.widget.PopupWindow.showAsDropDown(PopupWindow.java:1489)
at android.widget.PopupWindow.showAsDropDown(PopupWindow.java:1445)
at com.termux.app.TermuxActivity.showBoomDialog(TermuxActivity.java:2653)
at com.termux.app.TermuxActivity.doubleClicke(TermuxActivity.java:2629)
at com.termux.view.TerminalView.onTouchEvent(TerminalView.java:585)
at android.view.View.dispatchTouchEvent(View.java:15076)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3923)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3538)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3923)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3538)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3923)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3538)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3923)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3538)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3923)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3538)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3923)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3538)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3923)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3538)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3923)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3538)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3923)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3538)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3923)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3538)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3923)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3538)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3923)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:3538)
at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:1015)
at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1962)
at android.app.Activity.dispatchTouchEvent(Activity.java:4265)
at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:69)
at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:973)
at android.view.View.dispatchPointerEvent(View.java:15335)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:7794)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:7567)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6901)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:6958)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:6924)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:7122)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:6932)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:7179)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6905)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:6958)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:6924)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:6932)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6905)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:10354)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:10202)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:10158)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:10486)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:259)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:335)
at android.os.Looper.loopOnce(Looper.java:186)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8663)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)