MPAndroidChart icon indicating copy to clipboard operation
MPAndroidChart copied to clipboard

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

Open hamza94max opened this issue 2 years ago • 8 comments

Summary

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

Expected Behavior

expected to work successfully

Possible Solution

Device (please complete the following information):

  • Device: Samsung A107F
  • Android Version 10
  • Library Version v3.1.0 Capture

ADD A REWARD using Speed to SOLVE this issue QUICKLY and SUPPORT this project.

hamza94max avatar May 09 '23 13:05 hamza94max

Did you add the JitPack repository to your build file?

Should be something like this in the build.gradle of the root of your project:

allprojects {
    repositories {
	...

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

    }

}

fzanutto avatar May 09 '23 19:05 fzanutto

Same here, jitpack repository added but same error. EDIT: I have updated all gradle and modules version and now it works.

sidelux avatar May 10 '23 13:05 sidelux

Did you add the JitPack repository to your build file?

Should be something like this in the build.gradle of the root of your project:

allprojects {
    repositories {
	...

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

    }

}

yes, but not working

hamza94max avatar May 10 '23 16:05 hamza94max

@hamza94max I'm also facing this issue.

build.gradle (project)

buildscript {
    repositories {
        jcenter()
		google()
        mavenCentral()
        maven { url "https://jitpack.io" }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:8.0.2'
        classpath 'com.google.gms:google-services:4.3.10'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

plugins {
    id "org.sonarqube" version "3.3"
}

sonarqube {
    properties {
        property "sonar.projectKey", "xxxxx_for_android"
    }
}

build.gradle (:app)

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

settings.gradle

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

include ':app'

FYI, I'm using Gradle 8.0 on AS Flamingo. Seems like lots of MPAndroid chart examples found online requires v.3.10. Copy pasting them causes lots of import errors.

anta40 avatar Jun 05 '23 16:06 anta40

Same here, jitpack repository added but same error. EDIT: I have updated all gradle and modules version and now it works.

Could you elaborate your steps? Perhaps I'm missing something

anta40 avatar Jun 05 '23 16:06 anta40

Same here, jitpack repository added but same error. EDIT: I have updated all gradle and modules version and now it works.

Could you elaborate your steps? Perhaps I'm missing something

You need to update gradle version and all project dependencies.

sidelux avatar Jun 06 '23 08:06 sidelux

same problem

lenovix avatar Jun 08 '23 13:06 lenovix

image I added maven { url "https://jitpack.io" } to my settings.gradle file and it worked. Without updating any versions

Dalton-47 avatar Jul 25 '23 07:07 Dalton-47