Ari
Ari

Reputation: 1316

Adding two libraries creating error in Android studio

I have created an Android library and uploaded that to GitHub and using the same using jitpack.io. Now I created a modulelibrary for GPS location. Untill and unless I add the GPSlibrary it works fine. Once I add the Gps library in gradle file. The Jitpack library shows error.

What might I be missing/ doing wrong?

App gradle:

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.3"

defaultConfig {
    applicationId "com.example.ari"
    minSdkVersion 15
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.github.Aritra1704:UtilitiesJitPackLib:1.03' --> My jitpacklibrary
compile 'com.afollestad.material-dialogs:core:0.8.5.9'
compile 'com.google.android.gms:play-services:9.0.1'
compile 'com.google.android.gms:play-services-ads:9.0.1'
compile 'com.google.android.gms:play-services-auth:9.0.1'
compile 'com.google.android.gms:play-services-gcm:9.0.1'
compile project(':gpsutilities') --> My GPS library
}

Upvotes: 1

Views: 61

Answers (1)

Ari
Ari

Reputation: 1316

Sorry, my bad. But I did learn though one day lost for this.

Since I need to use my Jitpack library in my gpslibrary too, so I added the same link in gps library too. Since its added twice, most probably its conflicting.

Still if any one faces the same problem, do not add the same library in the app gradle as well as your module library. Only adding to module library will do.

Upvotes: 1

Related Questions