admin 管理员组

文章数量: 887007

Android Studio kotlin类报错,无法追踪代码。Syntax highlighting has been temporarily turned off in file

今天发现Android Studio有个kotlin类报错,如下:

Syntax highlighting has been temporarily turned off in file XX.kt because of an internal error

不影响代码运行,只是无法追踪该类的代码,所有引用该类的类都报红。

尝试过同步gradle、clean project、rebuild project、重启AS、重启电脑都无法解决。

解决方法File->Invalidate Caches,解决了我的问题。

 

本文标签: Android Studio kotlin类报错,无法追踪代码Syntax highlighting has been temporarily turned off in file