I am using MPAndroidChart libarary in android studio.But when i am trying to sync gradle which given an error as below image. Gradle text is here to compile MPAndroidChart libarary.
compile 'com.github.PhilJay:MPAndroidChart:v2.1.4'
Please help to resolve this problem. Thanks in advance
Or just rebuild your project. Worked for me
One Problem can also be, that you are behind a proxy. So there are two possibilities: Add your proxy config to android Studio, ore you can also add a gradle.properties file in your project root. there you have to enter the following credentials:
So the https Properties are pretty necessary. I figured out that often the repositories are available over both protocols. but sometimes only over http or https.
In Settings Gradle just add this following code:
Build-> Rebuild the project, then re-sync the gradle file.
The problem was solved after restarting Android Studio > rebuild project.
https://stackoverflow.com/a/29742712 The JitPack repository shouldn't be under buildscripts in this case. It should be just under repositories: