【问题标题】:Input dispatching timed out (Waiting to send non-key event because the touched window has not finished processing certain input events that were输入调度超时(等待发送非键事件,因为触摸的窗口尚未完成对某些输入事件的处理
【发布时间】:2019-07-13 18:37:10
【问题描述】:

输入调度超时(等待发送非按键事件,因为触摸的窗口尚未完成对 500.0 多毫秒前传递给它的某些输入事件的处理。

我有时会在同时单击多个按钮时收到此错误。长时间运行的操作在这里完成。

sendBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                runOnUiThread(new Runnable() {
                    @Override
                    public void run() {
                        sendChatTextContent(messageText, null, "", "");
                    }
                });
            }
        });

在 sendChatTextContent() 方法上,我检查了飞行模式状态、互联网连接、文本的 AES_Encryption,并使用 Service 将数据发送到 SignalR AWS 服务器。以前没有问题,但有时在将支持库更新到 androidx 后会出现此问题。 我该如何处理?

【问题讨论】:

  • 嘿,你找到解决方案了吗?如果是,请分享,因为我遇到了同样的问题并且无法解决!提前致谢!
  • 看来 androidx 库确实有问题!更新后我也遇到了类似的问题。

标签: android signalr androidx android-anr-dialog


【解决方案1】:

您对 sendChatTextContent() 的调用必须停止调用者:改用非 UI 线程...

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-03-07
    • 1970-01-01
    • 2016-06-22
    • 1970-01-01
    相关资源
    最近更新 更多