Android 日志消息 "InputMethodManager: The current service view is not the focus view"

标签 android android-input-method android-anr-dialog

运行我的 Android 应用程序时,我在应用程序生成 ANR 弹出警告之前在日志中看到以下警告级别消息:

“InputMethodManager:当前服务 View 不是焦点 View ”

单击 UI 中的编辑文本字段时收到消息。是什么原因导致该警告消息?

最佳答案

通常,当您在 UI 线程中执行一些长时间运行的作业(请求服务器/数据库、通过 sleep 等待某些事件等)时,会发生 ANR。

关于您的警告,当某些事件发生时,也许您会在另一个 View 上调用请求焦点。尝试评论您服务的一些逻辑并检查行为。

关于Android 日志消息 "InputMethodManager: The current service view is not the focus view",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59024432/

相关文章:

java - 如何在 Android 中递归扫描目录

android - Android 应用程序中的帮助 Activity

android - 如何使用 Kotlin 通过 POST 方法发送 HTTP 请求

java - 在无限循环中延迟调用方法

android - 从状态列表 drawable 中获取特定的 drawable

android - 从 AppWidgetProvider 启动服务时出现 ANR

java - Android Canvas 中的复合操作

android - 表情符号软键盘就像 android 中的 Whatsapp

java - 如何在android studio上切换软键盘

android ANR BillingClient.queryPurchases