Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to resolve:com.github.PhilJay:MPAndroidChart:v2.2.5 #1918

Closed
patelanil2007 opened this issue Jun 27, 2016 · 37 comments
Closed

Failed to resolve:com.github.PhilJay:MPAndroidChart:v2.2.5 #1918

patelanil2007 opened this issue Jun 27, 2016 · 37 comments

Comments

@patelanil2007
Copy link

No description provided.

@PhilJay PhilJay closed this as completed Jun 27, 2016
@patelanil2007
Copy link
Author

why u closed without specification. its not working

@PhilJay
Copy link
Owner

PhilJay commented Jun 27, 2016

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.

@patelanil2007
Copy link
Author

its not working man

@pfives
Copy link

pfives commented Jun 28, 2016

@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

@patelanil2007
Copy link
Author

@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

@pfives
Copy link

pfives commented Jun 30, 2016

@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" }
    }
}

@kfwong
Copy link

kfwong commented Jul 18, 2016

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

@ps06756
Copy link

ps06756 commented Dec 1, 2016

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

@amanshuraikwar
Copy link

Same problem for me, no solution is working!

@luowei428
Copy link

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

@harshalyeole-tudip
Copy link

Not working for me too

@phuwin1995
Copy link

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" }
}

@nirwannursabda
Copy link

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

@billrancho
Copy link

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.

@ayetolusamuel
Copy link

Nice work Dude.

@azisoli
Copy link

azisoli commented Jan 5, 2018

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
}

@parveenpjpt
Copy link

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

@anilthummar
Copy link

anilthummar commented Jan 29, 2018

Please add below code in gradle file:

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

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

}

@thisalwijayakumara
Copy link

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

@vishalsgithub
Copy link

vishalsgithub commented Sep 21, 2018

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

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

@luch1u
Copy link

luch1u commented Nov 11, 2018

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

@DicorProject
Copy link

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

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

}

its working

@SWAT10101
Copy link

@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

@Sanaebadi97
Copy link

https://stackoverflow.com/a/37892027/10699119

this link save my life

@RabbitCorp
Copy link

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

@Tabletin
Copy link

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 👍

@VictorKabata
Copy link

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.

Update the readme to show exactly where to place maven { url 'https://jitpack.io' }

@Licmeth
Copy link

Licmeth commented Aug 4, 2021

With a new project and an empty Activity in Android Studio, I needed to add maven {url 'https://jitpack.io'} to settings.gradle

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        jcenter() // Warning: this repository is going to shut down soon
        maven { url 'https://jitpack.io' }
    }
}

@shreyas1g
Copy link

Untitled
Untitled1

tryed all possible solutions still getting
Uploading Untitled2.png…

@shreyas1g
Copy link

Failed to resolve resolve:com.github.PhilJay:MPAndroidChart:v3.1.0

im using android studio version 2020.3.1

@frestoinc
Copy link

Failed to resolve resolve:com.github.PhilJay:MPAndroidChart:v3.1.0

im using android studio version 2020.3.1

Add it in your settings.gradle

dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { google() mavenCentral() maven { url "https://jitpack.io" } } }

@truedem
Copy link

truedem commented Nov 15, 2021

5 years later and this thing is still here (and no solutions work)

@teyteymey
Copy link

Failed to resolve resolve:com.github.PhilJay:MPAndroidChart:v3.1.0
im using android studio version 2020.3.1

Add it in your settings.gradle

dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { google() mavenCentral() maven { url "https://jitpack.io" } } }

For some reason this worked. I think it was putting the maven url in settings.gradle.
Also, instead of FAIL_ON_PROJECT_REPOS I had to put PREFER_SETTINGS.

@truedem
Copy link

truedem commented Dec 6, 2021

In my 7 years Android practice this is the first library which required editing settings.gradle

@HectorS123
Copy link

No se pudo resolver resolve:com.github.PhilJay:MPAndroidChart:v3.1.0 Estoy
usando la versión 2020.3.1 de Android Studio

Agrégalo en tu configuración.gradle
dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { google() mavenCentral() maven { url "https://jitpack.io" } } }

Por alguna razón esto funcionó. Creo que estaba poniendo la URL de maven en settings.gradle. Además, en lugar de FAIL_ON_PROJECT_REPOS tuve que poner PREFER_SETTINGS.

Perfect function.
Thanks

@sarvarmasharipov72
Copy link

I also have this problem but I did this added maven { url 'https://jitpack.io' } settings.gradle
image

@Noah-Mn
Copy link

Noah-Mn commented May 17, 2022

It finally worked for me as well

dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests