also compiles and runs from Android Studio:
val greeted = "World".also { println("Hello $it") }
Yet the editor highlights also
and it
as errors and don't give any help with intellisense. apply still works and when I go to source I can see the definition of both apply
and also
. How do I get Android Studio to recognize also
?
I've also had this problem with earlier versions.
I tried everything possible and nothing worked. The only solution for me was to delete .AndroidStudio folder from C:/Users/YourName/. Android Studio resets and everything works as it should.