Can not catch up Jsoup library
已回答
Hi!
I have Intellij IDEA community edition and trying to add Jsoup library in
gradle project this way:
compile "org.jsoup:jsoup:+"
But the following code
org.jsoup.nodes.Document document = Jsoup.connect("http://howtodoinjava.com").get();
Highlited as error and there is no option to automatically add imports. IDE simply
doesn't see the new library. In the same time JAR compiles well and I see
Jasoup.class is included in final jar.
I have tryed to add jsoup as local libraty this way:
repositories {
mavenCentral()
flatDir {
dirs './lib'
}
}
compile name: 'jsoup-1.10.2'
But the result was the same.
Please tell me how to make IDEA know about new library??
Thank you!
请先登录再写评论。
Does the code compile and run in IntelliJ IDEA? If so, please try File | Invalidate Caches | Invalidate and Restart.
Yes it does compile and run inside Intellij IDEA
also I have made "File | Invalidate Caches | Invalidate and Restart. several times"
Please share a sample project to reproduce the problem.
SOLUTION : File - Project Structure - Global Libraries - (+) - maven - type org.jsoup
This topic is closed.
Thank you.
This should not be needed in a Gradle project.