"Kotlin not configured" error on Android 3.5.3

4.4k Views Asked by At

I've updated Android Studio from 3.0 to 3.5.3 and receiving this error.

Kotlin not configured

enter image description here

Dependencies used in build.gradle

dependencies {
    compile 'org.jetbrains.kotlin:kotlin-stdlib:1.1.60'
    compile 'com.squareup.okhttp:okhttp:2.5.0'
}

Tried doing below tricks but nothing worked:

  1. Restarting
  2. Clean and Rebuild
  3. Invalidate caches/restart.
2

There are 2 best solutions below

2
On BEST ANSWER

I had the same issue and tried compiling with below code in build.gradle at buildscript level

repositories {
mavenCentral()
}
dependencies {
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:0.14.449'
classpath 'org.hidetake:gradle-ssh-plugin:1.1.3'
}
}

apply plugin: "kotlin" // or apply plugin: "kotlin2js" if targeting JavaScript
apply plugin: 'application'
apply plugin: "org.hidetake.ssh"



repositories {
mavenCentral()
}

dependencies {
compile 'org.jetbrains.kotlin:kotlin-stdlib:1.1.60'
compile 'com.squareup.okhttp:okhttp:2.5.0'
}

remotes {
edison {
host = 'host'
user = "root"
agent = true
}
}

task deploy(dependsOn: distTar) << {
ssh.run {
session(remotes.host) {
put from: '.tar', into: '.tar'
execute '.tar'
}
}
} 

Also let the dependencies you've mentioned above be same.

If you get any further issues after compiling your gradle try using Spotbugs

1
On

Try this. Go to File -> Settings -> Plugins -> Kotlin press uninstall) and after a restart of Android Studio reinstall the plugin.