我在 Play 商店控制台上收到以下崩溃报告:
android.app.RemoteServiceException:
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2240)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loop (Looper.java:246)
at android.app.ActivityThread.main (ActivityThread.java:8512)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1130)
Run Code Online (Sandbox Code Playgroud)
此崩溃主要发生在 Android 11 以及 Google Pixel 和 Samsung 设备上。我在互联网上搜索过,但没有找到有关此问题的帮助。
我们在运行 Android 11 的摩托罗拉设备上遇到了问题。在其他设备上,即使在 Android 11 上,我们也无法重现此问题。我们已经查看了UnsupportedOperationException:尝试从与某个不相关的上下文获取显示,但该线程是目前不活跃,因为我们没有收到任何回复。
该问题似乎与在 TextInput 字段中打开键盘有关。完整的错误语句如下。
Fatal Exception: java.lang.UnsupportedOperationException
Tried to obtain display from a Context not associated with one. Only visual Contexts (such as Activity or one created with Context#createWindowContext) or ones created with Context#createDisplayContext are associated with displays. Other types of Contexts are typically related to background entities and may return an arbitrary display.
Run Code Online (Sandbox Code Playgroud)