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:
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.
Downloaded the latest MPAndroidChart jar from: https://jitpack.io/com/github/PhilJay/MPAndroidChart/v3.0.1/MPAndroidChart-v3.0.1.jar
Copied the downloaded MPAndroidChart-v3.0.1.jar file to YourProject/app/lib directory
Compiled the following dependency at app level build.gradle
dependencies { compile files('libs/MPAndroidChart-v3.0.1.jar')}
re-sync the gradle