external library added but import not working


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.


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.

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.


Please sign in to leave a comment.