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.
Synthetic properties to access views were created as a way to eliminate the common boilerplate of findViewById calls. These synthetics are provided by JetBrains in the Kotlin Android Extensions Gradle plugin (not to be confused with Android KTX).
The kotlin-parcelize plugin provides a Parcelable implementation generator. To include support for Parcelable , add the following Gradle plugin to your app's build.gradle file: plugins { id 'kotlin-parcelize'
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With