Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android studio unresolved reference for lazy (kotlin)

I'm using Android Studio 3.5.3, kotlin plugin 1.3.61. But Android Studio doesn't see lazy function and highlight it red color. private val fabX: Float by lazy { screenWidth - fabSize - fabMargin }

I still can build my app, but syntax highlighting is broken. Is there any way how to fix it?

like image 375
Pein Avatar asked Oct 15 '25 16:10

Pein


1 Answers

Checkout this solution:

  • Go to C:\Users\YOUR_USER (Windows) or ~/ (Linux)
  • Delete .AndroidStudio[version] folder
  • Restart android studio

Following options did not work: * Invalidate cache and restart * Clean project * Reloading project from repo

like image 83
anro Avatar answered Oct 18 '25 05:10

anro



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!