PhilJay / MPAndroidChart

A powerful 🚀 Android chart view / graph view library, supporting line- bar- pie- radar- bubble- and candlestick charts as well as scaling, panning and animations.
Other
37.53k stars 9.01k forks source link

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

Open longhun522008 opened 3 years ago

longhun522008 commented 3 years ago

image

longhun522008 commented 3 years ago

image

Alstonargodi commented 3 years ago

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 commented 3 years ago

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

longhun522008 commented 3 years ago

thank you!!

M-Ali-D commented 3 years ago

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

It worked thanks

am263129 commented 2 years ago

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

Excellent Thank you. it saved me.

eduardofp90 commented 2 years ago

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

SeoHyunJong commented 2 years ago

Thank you so much!

Agusioma commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

aku juga berhasil

albarfikri commented 2 years ago

Thanks a lot that save up my timee!!

srajendiran30 commented 2 years ago

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 commented 2 years ago

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

pranjal-raj commented 2 years ago

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 commented 2 years ago

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 commented 1 year ago
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 commented 1 year ago
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' }
    }
}

Good, i got it.

Vincenter commented 1 year ago

引用失败了吧。。

r1305 commented 1 year ago

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

thanks! problem fixed!

arshadalisoomro commented 1 year ago

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 commented 1 year ago

thanks

ranggarahman commented 1 year ago

You saved my life Bro thanks

ErwinDevs commented 1 year ago

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

noion0511 commented 1 year ago

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 commented 10 months ago

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 commented 8 months ago

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

HISOKA715 commented 4 months ago

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

dribrahimalburaihi commented 4 months ago
    maven { url = uri("https://jitpack.io") }       }
Dishyma commented 3 months ago

image

Change to maven(url = "https://jitpack.io") work for me

image

eomwandho commented 1 month ago

Adding url maven { url = uri("https://jitpack.io") } to settings.gradle as shown below, worked for me.

pluginManagement {
    repositories {
        google {
            content {
                includeGroupByRegex("com\\.android.*")
                includeGroupByRegex("com\\.google.*")
                includeGroupByRegex("androidx.*")
            }
        }
        mavenCentral()
        gradlePluginPortal()

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