Android Studio 3 canary & Kotlin

Viewed 2590

Has anyone got the message "Kotlin not Configured"

I'm sure I missed something, but for the most part I downloaded it, and just had it import my existing 2.x settings. I tried a simply copy/paste from a java class to a new Kotlin file, and that's where I'm at.

Here is my current top level build.gradle

buildscript {
    repositories {
        jcenter {
            url = "http://jcenter.bintray.com/"
        }
        maven {
            url = "https://maven.google.com"
        }
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.0-alpha1'

    }
}

allprojects {
    repositories {
        jcenter {
            url = "http://jcenter.bintray.com/"
        }
        maven {
            url = "https://maven.google.com"
        }
        mavenCentral()
    }
}

And then at the top of my module build file I have these two lines

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

The current error is "Plugin with id 'kotlin-android' not found"

5 Answers

I had the same error. I solved it pretty simple: Modify build.gradle to force a gradle sync.

Simple. Just go to Tools -> Kotlin -> Configure kotlin in project. In the window that appears, click on Android with gradle. Let the project sync and you are good to go.

Related