Unresolved reference but IntelliJ can still run the program (Kotlin)

Answered

I have two projects, one of them is a jar (lib) to be used by the other application (demo), both are using Kotlin + Gradle. 

The project can be found in https://github.com/kelvin124/intellij-sample (They are independent, can be opened as two different project)

The lib is published to local maven repo, and the demo application can resolve it through gradle

But IntelliJ complaints about "Unresolved reference",

It really strange to me is that the demo application can still run within IDE, gradle can also build an executable jar (it also runs fine)

I have already tried but do not help

  1. reinstall
  2. invalidate caches & restart
  3. using older version of gradle (5.6.4)
  4. delete the whole gradle user home
  5. manually add the jar (lib) as dependency

 I have no idea what I am doing wrong, any clues or suggestions? Thanks.

0
3 comments

Please try deleting the System directory: https://www.jetbrains.com/help/idea/tuning-the-ide.html#system-directory when the IDE is not running.

0
Avatar
Permanently deleted user

Deleted IntelliJIdea2020.3 and reopen the "demo" project, same behaviour

0

Thanks for the information.

We'll continue at https://youtrack.jetbrains.com/issue/IDEA-264119 to avoid duplication.

0

Please sign in to leave a comment.