Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tried to access visual service WindowManager from a non-visual Context #433

Open
Just4fun2021 opened this issue Jan 31, 2023 · 0 comments
Open

Comments

@Just4fun2021
Copy link

E/ContextImpl: Tried to access visual service WindowManager from a non-visual Context:com.test.my.QtApplication@58739b4 WindowManager should be accessed from Activity or other visual Context. Use an Activity or a Context created with Context#createWindowContext(int, Bundle), which are adjusted to the configuration and visual bounds of an area on screen.
java.lang.IllegalAccessException: Tried to access visual service WindowManager from a non-visual Context:com.test.my.QtApplication@58739b4
at android.app.ContextImpl.getSystemService(ContextImpl.java:2195)
at android.content.ContextWrapper.getSystemService(ContextWrapper.java:917)
at me.jessyan.autosize.utils.ScreenUtils.getScreenSize(ScreenUtils.java:32)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant