I completely uninstalled IntelliJ and have now reinstalled and imported my project. I imported using gradle and can see all of the files in my project present. However, when I open a file I can't find any declaration to go to by doing cmd + click. I have the Java 7 SDK setup, and I can't even go to the declaration of classes in my own project. Going to a Java core class like String
or List
doesn't work either. How can I enable the IDE to be able to find my classes?
I'm on OSX Yosemite, IntelliJ 2016.1.2 build 145.972.
Your source folders where your Symbols are (Classes) are need to be configured as "Content Root".
Once done you should be able to navigate to your symbols.
In my case, I just updated my IntelliJ to Ultimate 2018.2 and all of my projects suddenly cannot find the implementations and the 'src' folders - it turned out IntelliJ removed the type of project (e.g. Maven).
What I did is:
I had this same problem, and @AniaG's solution in the comments worked for me.
src
folderCame across the same issue and in my case (Java project), I had to include all the dependent jars in the project's libraries section.
I had to add my project dependent jars in the above section (for example; project/web/lib/). After doing so, all resolved fine. I hope this will help someone.
In my case I was using a gradle project with subprojects. The reason IntelliJ couldn't find declarations was that the subprojects were not built.
After investigating why subprojects were not built, I found out that using "auto-import" was breaking the subprojects.
After importing the project from
build.gradle
without auto-import, it worked for me.In my case, none of the above helped. Only upgrade of Intellij from 2017.3 to 2018.2 helped.
Do not try 2018.1 as it had a bug wherein the Find files popup would not come up.