My ide started to show all Java imports in a kotli...
# intellij
j
My ide started to show all Java imports in a kotlin project as red. It's for sure a false alarm because the build is fine. Invalidating caches didn't solve it. Can someone offer any hint on how to try to debug such issues? I don't even know where to start (it's a gradle multi project build).
1
a
Have you tried to reimport the project ?
o
If cache invalidation isn’t enough, the next thing I try is deleting .idea and .gradle
c
idea now has a “File/Repair IDE” command that automates all those steps for you.
j
If cache invalidation isn’t enough, the next thing I try is deleting .idea and .gradle
Tried this too. It goes through reindexing of all libraries and at the end java stuff becomes red. It’s weird because it happens only in Kotlin subprojects that apply the “org.jetbrains.kotlin.jvm” plugin only. In other subprojects which apply the android plugin instead it doesn’t happen.
To fix it I had to do a complete uninstall of the ide and deletion of all settings (deleted pretty much anything related to Android Studio in ~/Library/Preferences, ~/Library/Application Support, ~?/Library/Caches and so on…)