I just updated to Android Studio 3.0 and I\'m getting this error with an existing project:
Kotlin not configured
When I go to
I first tried with invalidate cache/ restart option but it doesn't help me.
When I updated Kotlin to 1.1.60 in project's gradle file, problem is solved.
Also, use this in app's gradle for stdlib
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.1.60"
instead of
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:1.1.60"
In my case, it was a broken update of one of the plugins I've used. Check your error logs from Android Studio this will lead you to what is the problem.
I have faced this issue recently... when I updated to Android Studio 3.1 .
I did a few things to fix this.
First I updated the Kotlin version in my app gradle file and added
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.2.31"
in my app gradle file. But this alone didn't fix it.
Then uninstalled the kotlin plugin from settings, restarted Android Studio and installed it again.
EDIT :
This is my project gradle file
buildscript {
ext.kotlin_version = '1.2.31'
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.1'
classpath 'com.google.gms:google-services:3.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.31"
}
}
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
google()
}
}
And this is my app gradle file
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
...
}
buildTypes {
...
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
kapt { generateStubs = true }
}
repositories {
...
}
dependencies {
...
...
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.2.31"
...
...
}
apply plugin: 'com.google.gms.google-services'
I have tried all above solutions but non of them works for me.
Then finally I got success with below solution, so it may helpful for some one like me.
.iml
files (in root project, libraries and modules)In Android Studio, click on File -> Invalidate Caches / Restart... , then select "Invalidated and Restart". This solved my problem.
A common reason of the "Kotlin Not Configured" message is an internal Android Studio exception due to a bad plugin. In order to fix that you should disable the bad plugin.
When such plugin crash occurs, on the "Wellcome screen" you'll see a small notification (see illustration image) where you can click it and disable the bad plugin: