我已将 Android Studio 从 3.0 更新到 3.5.3 并收到此错误。
Kotlin 未配置
中使用的依赖项build.gradle
dependencies {
compile 'org.jetbrains.kotlin:kotlin-stdlib:1.1.60'
compile 'com.squareup.okhttp:okhttp:2.5.0'
}
尝试做以下技巧但没有任何效果:
- 重启
- 清理和重建
- 使缓存无效/重新启动。
我已将 Android Studio 从 3.0 更新到 3.5.3 并收到此错误。
Kotlin 未配置
中使用的依赖项build.gradle
dependencies {
compile 'org.jetbrains.kotlin:kotlin-stdlib:1.1.60'
compile 'com.squareup.okhttp:okhttp:2.5.0'
}
尝试做以下技巧但没有任何效果:
我遇到了同样的问题,并尝试在 build.gradle 的 buildscript 级别使用以下代码进行编译
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
尝试这个。转到文件 -> 设置 -> 插件 -> Kotlin 按卸载)并在重新启动 Android Studio 后重新安装插件。