Mpandroidchart: Failed to resolve:com.github.PhilJay:MPAndroidChart:v2.2.5

Created on 27 Jun 2016  路  26Comments  路  Source: PhilJay/MPAndroidChart

Most helpful comment

@patelanil2007 that is still not enough context. You need to have it under your allprojects script in your top level build.gradle.

buildscript {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
    }

}

allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
    }
}

All 26 comments

why u closed without specification. its not working

Because I spent about as much time as you did on resolving the issue.

I just tested resolving v2.2.5 on a demo project, it worked just fine. Without any further information I have absolutely no idea why it's not working for you.

its not working man

@patelanil2007 you are providing no other information other than it is not working. How is he supposed to help you?

You probably added jitpack.io to the wrong section of your project build.gradle see: http://stackoverflow.com/questions/32718820/failed-to-resolve-com-github-philjaympandroidchartv2-1-4

@pfives i have added below code in app's Build.gradle

repositories {
maven { url "https://jitpack.io" }
}

compile 'com.github.PhilJay:MPAndroidChart:v2.1.6'}

got below error

Error:(31, 13) Failed to resolve: com.github.PhilJay:MPAndroidChart:v2.1.6

i try to find lib from Library Dependency but can't find

@patelanil2007 that is still not enough context. You need to have it under your allprojects script in your top level build.gradle.

buildscript {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
    }

}

allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
    }
}

Just in case someone still having the similar issue:

I had this problem even though I set the jitpack.io url to the appropriate section in my build.gradle, as many closed issues I found having the same old replies, but none are working for me.

The problem lies with the gradle-wrapper.properties, you probably have to change the distribution url to the latest, in my case 2.10 to 2.14.1.

distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip

Ref:
http://stackoverflow.com/questions/33058358/jitpack-io-failed-to-resolve-github-repo

I am having the same problem, changing the distribution url in grade-wrapper.properties, also doesn't work for me.

Same problem for me, no solution is working!

@pfives 's comments worked. I just fixed my problem.

Not working for me too

If you have multiple maven repositories, do it like this

repositories {
    jcenter()
    maven { url "https://maven.java.net/content/groups/public/" }
    maven { url "https://jitpack.io" }
}

Believe it or not

Im changing URL from maven { url "https://www.jitpack.io" }
into
maven { url "https://jitpack.io" }

Now its working, what happen with triple www
Strange i think

for ones who still have this issue. You will need to separate jitpack and maven repos into buildscript and all project repositories.
It should look like
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com'
}
}
}

allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
}

it works fine for me.
Cheers mates.

Nice work Dude.

Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.github.PhilJay:MPAndroidChart:v3.0.3.

Could not get resource 'https://jcenter.bintray.com/com/github/PhilJay/MPAndroidChart/v3.0.3/MPAndroidChart-v3.0.3.pom'.

problem is that when i put this address in chorom https://jcenter.bintray.com/com/github/PhilJay/MPAndroidChart
there is no response actually there is PhilJay/XXX/ BUT THERE IS NO PhilJay/MPAndroidChart

BTW
this is my gradle 馃憤
buildscript {

repositories {

    jcenter()
    maven {
        url 'https://maven.google.com'
    }
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.0.0'


    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

}

allprojects {
repositories {

    jcenter()
    maven { url "https://jitpack.io" }
}

}

task clean(type: Delete) {
delete rootProject.buildDir
}

I have getting same issue i have just put the version name like this:

compile 'com.github.kittinunf.fuel:fuel:1.12.0' //for JVM
compile 'com.github.kittinunf.fuel:fuel-android:1.12.0' //for Android
compile 'com.github.kittinunf.fuel:fuel-livedata:1.12.0' //for LiveData support
compile 'com.github.kittinunf.fuel:fuel-rxjava:1.12.0' //for RxJava support
compile 'com.github.kittinunf.fuel:fuel-gson:1.12.0' //for Gson support
compile 'com.github.kittinunf.fuel:fuel-jackson:1.12.0' //for Jackson support
compile 'com.github.kittinunf.fuel:fuel-moshi:1.12.0' //for Moshi support

And it will Resolve.

Reagrd
Parveen Prajapati

Please add below code in gradle file:

repositories {
jcenter()
maven { url "https://jitpack.io" }
}
dependencies {

implementation 'com.github.PhilJay:MPAndroidChart:v2.2.4'

}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

repositories {
maven { url 'https://jitpack.io' }
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
implementation 'com.google.android.gms:play-services-maps:15.0.1'

}

Its not working

I have solved this issue by Disable the Gradle offline work in settings.

Go to File>Setting>Gradle Disable Offline Work,
and try again

I have solved this issue by Disable the Gradle offline work in settings.

Go to File>Setting>Gradle Disable Offline Work,
and try again

This works for me :D

repositories {
maven { url "https://jitpack.io" }
}

dependencies {
compile 'com.github.PhilJay:MPAndroidChart:v2.2.4'

}

its working

@patelanil2007 that is still not enough context. You need to have it under your allprojects script in your top level build.gradle.

buildscript {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
    }

}

allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
    }
}

it is work on android studio 3.4

Yeah, its working for me,

  1. You need the 3.0 version of Gradle or later(file: gradle-wrapper.properties )
    distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
  2. In tour gradle.build (Module:Project:)
buildscript {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
    }
}
allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
    }
}

3.In tour gradle.build (Module:app)
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0-alpha'
4.Profit

I had the same problem, but it was solved adding:

buildscript {
repositories {
google()
jcenter()
maven {url 'https://jitpack.io'}
}
dependencies {
classpath "com.android.tools.build:gradle:4.0.1"

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

}

allprojects {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
}
}

Thanks, Phil Jay for this amazing library :+1:

Was this page helpful?
0 / 5 - 0 ratings