import kotlinx.android.synthetic.main.activity_main is not working
Check "build.gradle(:app)" file,
plugins {
id 'com.android.application'
id 'kotlin-android'
}
if kotlin extension is missing, add kotlin-android-extensions
as shown below and click on "Sync now"
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-android-extensions'
}
Can you try
- File | Invalidate Caches / Restart
- Deleting .idea folder
- Clean
- Re-import the project
OR just remove apply plugin: 'kotlin-android-extensions'
, sync gradle plugin and then I added it again.