Kotlin : Cannot find symbol class Fragment or other android classes

Problem : I made a stupid mistake that I forgot to apply kotlin-android plugin

Solution : On the top of app gradle file paste :

apply plugin: 'kotlin-android'

Sometimes I had this kind of error even when this:

apply plugin: 'kotlin-android'

was in my app gradle.

The solution is to delete the app/build directory. This folder is auto generated so there will be no problems deleting it.

Hope this will help somebody.