TomTom
TomTom

Reputation: 2930

How to import a library into Intellij?

I'd like to add a library to my project in Intellij. After adding the external library in the project settings Intellij recognizes the library and tells me to import it when trying to instantiate an object from the external classes.

But when I try to import a class from the external library Intellij doesn't accept it, by saying "Cannot resolve symbol".

Intellij - class import error

Upvotes: 1

Views: 2031

Answers (1)

Michael
Michael

Reputation: 2726

Create a lib directory in your project. Drop your jar in there, then right-click on the lib directory and select "Add as Library".

Upvotes: 2

Related Questions