When I try to add Kotlin to our Android project using the official Kotlin tutorial, Gradle fails launching the error Extension with name 'android' does not exist.
Android Studio modifies your build.gradle adding apply plugin: 'kotlin-android' above apply plugin: 'com.android.application'. Just move the Kotlin line below the Android one and Gradle will run smoothly. It should look like this example:
apply plugin: 'com.android.application' apply plugin: 'kotlin-android'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With