I just started learning Kotlin for android development and started an empty project and added an activity. I have added the required gradle dependencies as said in Kotlin do
I solved the issue by upgrading the gradle plugin version to 3.0.0-alpha2 and using gradle wrapper gradle-4.0-milestone-1-all.zip.
I logged the issue in android studio issue tracker - https://issuetracker.google.com/u/1/issues/62251892