Answer the question
In order to leave comments, you need to log in
Why can't I import libraries in IntelliJ using Gradle?
Hello. Registered dependencies in build.gradle:
repositories {
maven { url "http://repo.maven.apache.org/maven2" }
mavenCentral()
mavenLocal()
}
dependencies {
compile(
[group: 'com.google.guava', name: 'guava', version: '18.0'],
[group: 'org.apache.commons', name: 'commons-lang3', version: '3.3.2'],
[group: 'net.java.dev.jna', name: 'jna', version: '4.5.0'],
[group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.7.25'],
[group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25']
)
}
Answer the question
In order to leave comments, you need to log in
there is something with the project structure... the simplest thing is to do File->New->Project from exising sourse and select this project there at the gradle.build level. The project will be rebuilt with the correct structure (now I don't see the source sets on the right, but the dependencies should be in them)
By the way, why so many mavenrepos?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question