5

We are facing an issue with Motorola devices running Android 11. On other devices, we are unable to reproduce this issue even on Android 11. We have already looked at UnsupportedOperationException: Tried to obtain display from a Context not associated with one but that thread is not active right now as we are not getting any response.

The issue seems to be linked with opening the keyboard in the TextInput fields. The complete error statement is as follows.

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.
  • Hello, Have you solved this issue or do you have any ideas why it's happening? My app is experiencing the same issue. Thanks – tatocaster Dec 15 '21 at 05:42

1 Answers1

0

Which version of the AppCompat library do you use? If it's 1.2.0 or below and you are using this workaround -> Change Locale not work after migrate to Androidx switch to 1.3.1 or newer and remove the workaround (it's being fixed). Currently, 1.4.1 is the latest

This fixed the exact same problem, exactly on Android 11 and exactly on Motorola for me.

tatocaster
  • 156
  • 2
  • 9