I opened my Studio today and Android Studio didn't recognize Kotlin files. .kt
files started showing up as just an ordinary file. I checked my Plugins and I still have the Kotlin plugin. I tried uninstalling and installing it again. But no use.
I tried building my building my project from Terminal and it works fine. But Android studio doesn't understand Kotlin files.
Configuration:
Android Studio 3.1
Kotlin 1.2.41
OS: MacOS Sierra
Go to Library/Preferences
and delete the AndroidStudio3.1
folder. This is the config directory for my Android Studio.
Once deleted, I started Studio again, and the config was created fresh. Now everything worked perfectly.