0

I'm working on Android project where I'm trying to add MPAndroidChart as follows,

At project level build.gradle file I've two repositories,

allprojects {
  repositories {
    jcenter()
    maven { url 'https://maven.google.com' }
    maven { url "https://jitpack.io" }
  }
}

Gradle 'Sync' at this point worked okay. After that I added following line to the app/build.gradle file as,

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

With this change, I started getting 'Could not resolve' error shown below, Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.github.PhilJay:MPandroidChart:v3.0.3.

What am I missing? Any help is appreciated.

Build env: Mac OS X High Sierra, 10.13 Android Studio version: 3.1.2

Atarang
  • 422
  • 1
  • 6
  • 22

3 Answers3

1

(Project)build.gradle

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

}

(app)build.gradle dependency

implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
Jay Thummar
  • 2,281
  • 1
  • 14
  • 22
0

Try this

Please add below code in gradle file:

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

 }



dependencies {

implementation 'com.github.PhilJay:MPAndroidChart:v2.2.4'
}
Android Geek
  • 8,956
  • 2
  • 21
  • 35
-1

Well, i added the code you post, but mine works well... AndroidStudio 3.1 Beta2, macOS High Sierra Version 10.13.4. So check your code again, or blame your AS...

wkm
  • 347
  • 3
  • 6