gpt4 book ai didi

android - 在运行 Android 11 的摩托罗拉设备上打开键盘时应用程序崩溃

转载 作者:行者123 更新时间:2023-12-04 23:45:12 26 4
gpt4 key购买 nike

我们在运行 Android 11 的摩托罗拉设备上遇到问题。在其他设备上,即使在 Android 11 上我们也无法重现此问题。我们已经查看了 UnsupportedOperationException: Tried to obtain display from a Context not associated with one但该线程现在不活跃,因为我们没有得到任何回应。
该问题似乎与在 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.

最佳答案

您使用哪个版本的 AppCompat 库?如果它是 1.2.0 或更低版本并且您正在使用此解决方法 -> Change Locale not work after migrate to Androidx切换到 1.3.1 或更高版本并删除解决方法(正在修复)。目前,1.4.1 是最新的
这解决了完全相同的问题,正好在 Android 11 上,对我来说正好在摩托罗拉上。

关于android - 在运行 Android 11 的摩托罗拉设备上打开键盘时应用程序崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69207029/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com