When building, Gradle gave me the Failed to resolve: com.github.PhilJay:MPAndroidChart:v2.2.4
error.
I already added jitpack
in build.gradle
here:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
flatDir {
dirs 'aar'
}
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
This is based here. What am I missing?
Switch to the latest version:
compile 'com.github.PhilJay:MPAndroidChart:v3.0.0-beta1'
And always use information for the main source - in this case MPAndroidChart Github Repo Readme.MD
If behind a proxy configure your proxy settings in gradle.properties
as follows:
systemProp.http.proxyHost=103.7.11.34
systemProp.https.proxyPort=8080
systemProp.https.proxyHost=103.7.11.34
systemProp.http.proxyPort=8080
Note: IP address and port in the lines above to be replaced by your proxy server ip address (or url) and port