parsecer
parsecer

Reputation: 5106

Idea Intellij: Dependency org.json:json:20180813 not found, can't import org.json library in maven

I try to add the following dependency in my pom.xml file:

<dependency>
    <groupId>org.json</groupId>
    <artifactId>json</artifactId>
    <version>20180813</version>
</dependency>

However, the <version> tag's content gets highlighted in red and the Dependency org.json:json:20180813 not found error pops up:

enter image description here

enter image description here

Why does this happen and how to fix it?

Upvotes: 2

Views: 10715

Answers (2)

I have made some test, and on my computer with fresh repositorys it is working, on the old one not.

In intellij go to settings (ctrl alt s) -> Build,execution,deployment -> Build Tools -> Maven -> Repositorys

Click on maven -> and update on the right corner.

Upvotes: 3

parsecer
parsecer

Reputation: 5106

cloud1's answer helped me out:

Try pressing 'Reimport All Maven Projects' button. It's the first button at Maven Projects tab (blue circle). Looks like this dependency wasn't downloaded from Internet yet.

Upvotes: 5

Related Questions