I solved this by selecting "Project" as view (by default i had "Project Files"). Hope this helped.
Project View VS. Project Files view
Answer from Luca on Stack OverflowI solved this by selecting "Project" as view (by default i had "Project Files"). Hope this helped.
Project View VS. Project Files view
I've had the same problem and narrowed it down to the following configuration that might have been messed up during the upgrade.
File (on Mac): ~/Library/Preferences/IntelliJIdea2018.1/options/projectView.xml
<application>
<component name="ProjectViewSharedSettings">
<option name="showLibraryContents" value="false" />
<option name="showMembers" value="true" />
</component>
</application>
Change/remove the showLibraryContents entry. This setting is no longer available in the UI, "External Libraries" are always shown.
java - I can't see all librabries in my intellij idea external library folder - Stack Overflow
java - IntelliJ IDEA is only showing External Libraries in the project window - Stack Overflow
java - IntelliJ Doesn't Properly Import Jars - Stack Overflow
How do I import external libraries into a project in IntelliJ?
Not trying to be snarky, but I would suggest throwing basic questions like this into google/stack overflow as they will no doubt give you instant answers and let you get back to coding quickly!
Steps for adding external jars in IntelliJ IDEA:
-
Click File from File menu
-
Project Structure (CTRL + SHIFT + ALT + S on Windows/Linux, ⌘ + ; on Mac OS X)
-
Select Modules at the left panel
-
Dependencies tab
-
'+' → JARs or directories
From: http://stackoverflow.com/questions/1051640/correct-way-to-add-external-jars-lib-jar-to-an-intellij-idea-project
More on reddit.comright click the libs you added in Project Structur --> Libraries, click Add to Modules...
After that, make sure the libs are shown in Project Structure --> Modules --> Dependencies
Hope this helps you.
I reinstalled IDEA and now everything works properly. Seems to be an older version file which didn't allow the ide to show everything correctly.
EDIT
After a deeper look at it I found out that it won't show up in the External Libraries folder if you have it in a Project folder. :D The meaning of external library is important.
Go to File> Project Structure> Modules(under Project Settings). There click "+ Add Content Root" and select your project directory. It will detect src folder which resides in your project.
I have solved mine using this method, hope it helps!
Probably there was an issue with the project import. Try the following troubleshooting steps one by one to address it.
- Try to clear
File | Invalidate Caches... | Invalidate and Restart - Close the project window at
File | Close Projectand IntelliJ and try to reopen it. - Open your project in OS file explorer and remove all
*.imlfiles and the.ideafolder from your project. - Re-import the project into IntelliJ from Existing sources by selecting pom.xml - https://www.jetbrains.com/help/idea/import-project-or-module-wizard.html
You are doing it right, libraries are configured in the Module Dependencies. Verify that the correct files were added there.
You should be able to browse inside the jars in the Project View under Libraries node. If you can't see the jars there, then your library is not configured properly. If you see the jars, but can't see classes inside of them, they are probably broken, replace them with the valid copies.
Also check that the libraries are added to the dependencies of the correct module where you try to import and use them. Verify the scope of the dependency, Compile is most likely what you need.
File | Invalidate Caches may help in case everything looks correct, but doesn't work.
If nothing helps, please share a sample project with the libraries to illustrate the issue.
I met this problem too, what i did is close current project and recreate/import the project and then import jars, and it works. I know its not wise ,but it's a direct and simple way. As i tried all the thing CRAZYCODER said but not work.
Hello. I'm working on writing a plugin and I'm not sure how to import external libraries into it to get it to work. Any help would be greatly appreciated.
Not trying to be snarky, but I would suggest throwing basic questions like this into google/stack overflow as they will no doubt give you instant answers and let you get back to coding quickly!
Steps for adding external jars in IntelliJ IDEA:
-
Click File from File menu
-
Project Structure (CTRL + SHIFT + ALT + S on Windows/Linux, ⌘ + ; on Mac OS X)
-
Select Modules at the left panel
-
Dependencies tab
-
'+' → JARs or directories
From: http://stackoverflow.com/questions/1051640/correct-way-to-add-external-jars-lib-jar-to-an-intellij-idea-project
It this an simple IntelliJ project, or a maven-based project which you have imported?