Failed to resolve: com.github.PhilJay:MPAndroidChart:v2.1.4 Failed to resolve: com.github.PhilJay:MPAndroidChart:v2.1.4 android android

Failed to resolve: com.github.PhilJay:MPAndroidChart:v2.1.4


Add

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

to repositories under allprojects not under buildscript see screenshot:

enter image description here


Putting

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

in build.gradle in app folder fixed my issue!


Above solutions did not work for me. I used below to get MPAndroidChart lib working on my project.

  1. Downloaded the latest MPAndroidChart jar from: https://jitpack.io/com/github/PhilJay/MPAndroidChart/v3.0.1/MPAndroidChart-v3.0.1.jar

  2. Copied the downloaded MPAndroidChart-v3.0.1.jar file to YourProject/app/lib directory

  3. Compiled the following dependency at app level build.gradle

    dependencies {    compile files('libs/MPAndroidChart-v3.0.1.jar')}
  4. re-sync the gradle