MPAndroidChart icon indicating copy to clipboard operation
MPAndroidChart copied to clipboard

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

Open longhun522008 opened this issue 3 years ago • 32 comments

image

longhun522008 avatar Sep 01 '21 02:09 longhun522008

image

longhun522008 avatar Sep 01 '21 02:09 longhun522008

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

Alstonargodi avatar Sep 01 '21 04:09 Alstonargodi

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

build3r avatar Sep 01 '21 09:09 build3r

thank you!!

longhun522008 avatar Sep 01 '21 09:09 longhun522008

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

It worked thanks

M-Ali-D avatar Sep 08 '21 07:09 M-Ali-D

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

Excellent Thank you. it saved me.

am263129 avatar Oct 27 '21 16:10 am263129

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

eduardofp90 avatar Nov 03 '21 23:11 eduardofp90

Thank you so much!

SeoHyunJong avatar Dec 02 '21 12:12 SeoHyunJong

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

Agusioma avatar Jan 05 '22 16:01 Agusioma

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

ghost avatar Jan 28 '22 17:01 ghost

aku juga berhasil

kickymaulana avatar Feb 06 '22 03:02 kickymaulana

Thanks a lot that save up my timee!!

albarfikri avatar Mar 01 '22 08:03 albarfikri

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

srajendiran30 avatar May 25 '22 15:05 srajendiran30

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

SuntoshKumar avatar May 31 '22 08:05 SuntoshKumar

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

pranjal-raj avatar Jun 09 '22 22:06 pranjal-raj

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'

sanj-tech avatar Jul 21 '22 08:07 sanj-tech

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 avatar Nov 16 '22 11:11 otoo-peacemaker

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

Good, i got it.

otoo-peacemaker avatar Nov 16 '22 11:11 otoo-peacemaker

引用失败了吧。。

Vincenter avatar Dec 22 '22 09:12 Vincenter

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

thanks! problem fixed!

r1305 avatar Jan 29 '23 06:01 r1305

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.

arshadalisoomro avatar May 04 '23 04:05 arshadalisoomro

thanks

vedanshk avatar May 11 '23 04:05 vedanshk

You saved my life Bro thanks

ranggarahman avatar May 27 '23 14:05 ranggarahman

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

ERwiin21MP avatar Jun 26 '23 22:06 ERwiin21MP

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

noion0511 avatar Sep 15 '23 13:09 noion0511

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

Suladis avatar Nov 10 '23 00:11 Suladis

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

wanchai9300 avatar Dec 25 '23 04:12 wanchai9300

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

HISOKA715 avatar Apr 20 '24 13:04 HISOKA715

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

dribrahimalburaihi avatar May 15 '24 03:05 dribrahimalburaihi