Unresolved references in Kotlin/Gradle module

Answered

Hi,

My project has 2 modules, one is java/Ant build (A), second is kotlin/Gradle (B). In both of these modules I use one and the same dependency on a 3rd party java package (C).

I've updated IntelliJ Idea from (Build: 201.6668.121 Released: 9 April 2020) to the latest version (Build: 201.7223.91 Released: 30 April 2020) and now in project B Idea doesn't seem to recognise references from that C package. I tried everything: invalidate/restart caches, creating a new workspace with cloning my project from the scratch, rebooting, wiping out all caches I could find (IntelliJ Idea caches, Gradle caches, etc). Gradle is able to build the project, Idea can build the project but still it shows "unresolved references" for references from C.

I've side-installed Idea 2019.3.5, opened the same project and everything appeared to be just fine. I opened the same folder in 2020.1.1 — unresolved references. I can see package C in dependencies list in both 2019 & 2020 versions but only Idea 2019 correctly recognises references. Same project, same folder, the project is built successfully from CLI, everything works OK but Idea 2020.1.1.

Idea is able to correctly recognise usage of C references in module A in both 2019 & 2020.

0
1 comment

How do you configure this dependency in both modules exactly? Please make sure you have this dependency listed in Dependencies tab of the (B) module where you have this problem.

Do I understand correctly that classes in module (A) correctly resolves classes from this dependency but not classes from module (B)? It is strange situation. Could you please provide some minimal project where this could be reproduced to take a closer look? Thank you.

For uploading you can use ftp://ftp.intellij.net/.uploads / https://uploads.services.jetbrains.com or any file sharing service.

0

Please sign in to leave a comment.