我刚刚更新到Android Studio3.0,在现有项目中遇到以下错误:

Kotlin not configured

When I go to Tools>Kotlin>Configure Kotlin in Project, I get an error saying "no configurators available". Also get the error below with the red java:

enter image description here

我也try 过:

  • 重新启动
  • 清理和重建
  • 使缓存失效/重新启动.

推荐答案

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"

Kotlin相关问答推荐

带有Spring Boot和Kotline的可嵌入实体

升级使用jOOQ Gradle插件生成代码失败

Kotlin:有限的并行性并不是限制并行性

在Kotlin lambda的参数中如何指定函数类型?

Spring Boot Kotlin 数据类未使用 REST 控制器中的默认值初始化

如何获取@JsonProperty 名称列表?

无法从 XML 访问 NavHostFragment

如何在顶级函数中使用 koin 注入依赖项

主机名不能为空

如何在MVVM架构中观察RecyclerView适配器中的LiveData?

Kotlin惰性默认属性

Kotlin 扩展函数 - 覆盖现有方法

将ExpectedException与Kotlin一起使用

使用导航组件在BottomNavigationView中传递参数

如何为 Java 调用者声明返回类型为void的 Kotlin Lambda?

在kotlin中初始化类变量的正确位置是什么

Kotlin-将UTC转换为当地时间

Android Kotlin .visibility

如何修复未解析的参考生命周期范围?

Kotlin:获取文件的扩展名,例如.txt