external library added but import not working

Answered

jetbrains 15.0.6

added hamcrest jar and it shows properly (I.e. I can drill all the way down to methods in the library) under external libraries inside java project, however; import static doesn't find the library. 

Seems likely I missed a step but don't see what it might have been.

 

2 comments
Comment actions Permalink

Make sure it's added to the dependency of the appropriate module, see http://www.jetbrains.com/idea/webhelp/configuring-module-dependencies-and-libraries.html .

If the issue remains, please provide a sample project illustrating the problem and the exact steps to reproduce.

0
Comment actions Permalink

Thanks for the quick response. 

The problem ended up being the selection for scope. For some reason the library came in defaulted to Test. Changing to compile fixed it.

0

Please sign in to leave a comment.