getWindow() command is not recognized

Asked

Viewed 48 times

-1

Someone help me for love of desu, to using SDK 29 so the problem is not that at least...

  • getWindow() is a method of Activity, and its class us Appcompatactivity, not sure if it is compatible, maybe you need to take Activity or cast a

  • 1

    Try to invalidate the cache and restart. Go to File > Invalidate Caches / Restart...> Invalidate and Restart. Calling the method within Activity was to be able to call the method.

  • @Ricardopunctual is computable yes.

  • 1

    Put as answer @Murillocomino my hero, was with this problem for days stagnant without doing anything, this problem was occurring with other commands and was torturing me LOVE YOU FUCKING

  • @I put as an answer, if I can mark it. I’m glad I helped! Hugs.

1 answer

3


This problem may occur sometimes and as you are calling a method that is compatible with Appcompatactivity and is not going, the problem may be in the cache of android studio.

What you can do is the following:

Go to File > Invalidate Caches / Restart...> Invalidate and Restart.

This action solves many problems in Android Studio, it is the first that I use when I have similar problems.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.