J
J
Julia2014-08-13 19:44:08
IntelliJ IDEA
Julia, 2014-08-13 19:44:08

How to connect a library to a project in Intellij IDEA using Gradle?

Recently it was necessary to make a project-test task. The project had to be built with Gradle, use third-party libraries, and live on GitHub. One of the errors is the incorrect connection of the library to the project (downloaded jar, put it in a folder, signed dependencies, because I don’t know how else). So the essence of the question is this: how else can I use gradle to connect the library as a dependency in IDEA and how to do it?
Thanks in advance!
PS The library lives at the following address: https://github.com/nostra13/Android-Universal-Imag...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
FanKiLL, 2014-08-13
@YushkaD

Well, the website says how.
You have a build.gradle file in your project, in the file there is a block with dependencies
and paste it there, something like this:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.2'
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question