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:v3.1.0 #5181

Open
longhun522008 opened this issue Sep 1, 2021 · 29 comments
Open

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

longhun522008 opened this issue Sep 1, 2021 · 29 comments

Comments

@longhun522008
Copy link

image

@longhun522008
Copy link
Author

image

@Alstonargodi
Copy link

I have that problem same as u before when I put maven URL in build.Gradle(project), like this
Screenshot 2021-09-01 110452

But when I put the maven URL in the setting. Gradle, is working fine and maybe u can try this solution
Screenshot 2021-09-01 110650

@build3r
Copy link

build3r commented Sep 1, 2021

Adding maven { url 'https://jitpack.io' } in setting.gradle indeed fixes the problem

@longhun522008
Copy link
Author

thank you!!

@M-Ali-D
Copy link

M-Ali-D commented Sep 8, 2021

Adding maven { url 'https://jitpack.io' } in setting.gradle indeed fixes the problem

It worked thanks

@King-Mufasa
Copy link

Adding maven { url 'https://jitpack.io' } in setting.gradle indeed fixes the problem

Excellent Thank you. it saved me.

@eduardofp90
Copy link

Thank you!!!! you save me my life!! I have a final project for a master haha!

@SeoHyunJong
Copy link

Thank you so much!

@Agusioma
Copy link

Agusioma commented Jan 5, 2022

I have that problem same as u before when I put maven URL in build.Gradle(project), like this Screenshot 2021-09-01 110452

But when I put the maven URL in the setting. Gradle, is working fine and maybe u can try this solution Screenshot 2021-09-01 110650

Kudos! And many thanks. It fixed the problem

@ghost
Copy link

ghost commented Jan 28, 2022

android studio couldn't allow me to add the following codes in app level gradle
repositories {
google()
mavenCentral()
maven(url 'https://jitpack.io')
}

image

but when I add this in project level gradle. Then i found the following error:

image

I want to use 'com.github.PhilJay:MPAndroidChart:v3.1.0' into my project.
Now what could be the solution. Please anyone help me

@kickymaulana
Copy link

aku juga berhasil

@albarfikri
Copy link

Thanks a lot that save up my timee!!

@srajendiran30
Copy link

android studio couldn't allow me to add the following codes in app level gradle repositories { google() mavenCentral() maven(url 'https://jitpack.io') }

image

but when I add this in project level gradle. Then i found the following error:

image

I want to use 'com.github.PhilJay:MPAndroidChart:v3.1.0' into my project. Now what could be the solution. Please anyone help me

add in project level gradle and not app level gradle

@SuntoshKumar
Copy link

Adding maven only to the setting.gradle solved my problem.
Screenshot from 2022-05-31 15-17-25

@pranjal-raj
Copy link

I have that problem same as u before when I put maven URL in build.Gradle(project), like this Screenshot 2021-09-01 110452

But when I put the maven URL in the setting. Gradle, is working fine and maybe u can try this solution Screenshot 2021-09-01 110650

Thanks Man

@sanj-tech
Copy link

Its working![MpChart Jitpack](https://user-images.githubusercontent.com/81187698/180162260-c389a509-8cc2-423b-8d1b-642738dca205.PNG)
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven{url 'https://jitpack.io'}
}
}
rootProject.name = "BarChartDemo"
include ':app'

@otoo-peacemaker
Copy link

otoo-peacemaker commented Nov 16, 2022

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

Show in Project Structure dialog

Affected Modules: app

possible solution

repositories {
        gradlePluginPortal()
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' }
        }
    }

But it is giving me an error.

@otoo-peacemaker
Copy link

otoo-peacemaker commented Nov 16, 2022

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

Good, i got it.

@Vincenter
Copy link

引用失败了吧。。

@r1305
Copy link

r1305 commented Jan 29, 2023

Adding maven { url 'https://jitpack.io' } in setting.gradle indeed fixes the problem

thanks!
problem fixed!

@arshadalisoomro
Copy link

Today I faced same problem and it took a lot of time to fix this issue, even solutions mentioned here didn't work for me. I came up with latest solution:

SETP - 1 in settings.gradle

pluginManagement {
    repositories {
        google()
        mavenCentral()
        gradlePluginPortal()
    }
}
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' }
    }
}
rootProject.name = "YOUR_SWEET_APP"
include ':app'

SETP - 2 in project level build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        google()
        maven { url 'https://jitpack.io' }
    }
    dependencies {
        .....
    }
}

SETP - 3 in module build.gradle

dependencies {
    implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
}

Done.

@vedanshk
Copy link

thanks

@ranggarahman
Copy link

You saved my life Bro thanks

@ERwiin21MP
Copy link

La Ultima solución, me funciono, la de los tres pasos.

@noion0511
Copy link

If you are a build.gradle.kts file

settings.gradle.kts

pluginManagement {
    repositories {
        google()
        mavenCentral()
        gradlePluginPortal()
    }
}
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        Maven (photo = "https://jitpack.io ")
    }
}
rootProject.name = "YOUR_SWEET_APP"
include ':app'

build.gradle.kts

// MPAndroidChart
    implementation("com.github.PhilJay:MPAndroidChart:v3.1.0")

@Suladis
Copy link

Suladis commented Nov 10, 2023

Noion's solution worked for me with a small alteration:

pluginManagement {
    repositories {
        google()
        mavenCentral()
        gradlePluginPortal()
    }
}

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

@wanchai9300
Copy link

maven ("https://jitpack.io")

@HISOKA715
Copy link

HISOKA715 commented Apr 20, 2024

maven { url = uri("https://jitpack.io") } this worked to me

@dribrahimalburaihi
Copy link

    maven { url = uri("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