Android 3.5.3上出现“未配置Kotlin”错误

时间:2019-12-09 01:56:24

标签: android android-studio kotlin kotlin-android-extensions android-studio-3.5

我已将Android Studio从3.0更新到3.5.3,并收到此错误。

  

未配置Kotlin

enter image description here

build.gradle

中使用的依赖项
dependencies {
    compile 'org.jetbrains.kotlin:kotlin-stdlib:1.1.60'
    compile 'com.squareup.okhttp:okhttp:2.5.0'
}

尝试执行以下技巧,但无济于事:

  1. 重新启动
  2. 清理并重建
  3. 使缓存/重启无效。

2 个答案:

答案 0 :(得分:1)

我遇到了同样的问题,并尝试在buildscript级别使用build.gradle中的以下代码进行编译

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'
}
}
} 

也让您上面提到的依赖项相同。

如果在编译gradle之后还有其他问题,请尝试使用Spotbugs

答案 1 :(得分:0)

尝试一下。转到“文件”->“设置”->“插件”->“ Kotlin按卸载”,然后在重新启动Android Studio后重新安装该插件。

相关问题