Import library in Eclipse without jar

I am using Eclipse to develop an Android application. I need to use a library that can be imported using gradle (from the Maven repository), since the jar is not provided. How can i do this?

+4
source share
3 answers

Try this link?

Create a new folder called basic-eclipse.

Inside the folder, create the src / main / java folders.

Create a Gradle build file in the basic-eclipse folder with the following contents:

    apply plugin: 'java'
    apply plugin: 'eclipse'

    repositories {
        mavenCentral ()
    }

    targetCompatibility = 1.6

    dependencies {
        compile 'commons-lang:commons-lang:20030203.000129'
        testCompile 'junit:junit:4.+'
    }

Gradle eclipse

Eclipse " → → Workspace" basic-eclipse.

import-eclipse-project , src/main/java . , Commons-Lang Junit ( Hamcrest, , Junit).

+1

For your questions, you want to import ".jar" and ".aar", I think you should choose AS.

-1
source

All Articles