repositories {
maven { url "https://jitpack.io" }
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.github.PhilJay:MPAndroidChart:v2.2.2'
}
I am getting the Error:Connection timed out: connect
in online mode whereas while changing the gradle setting to offline, I could not open the library.
Perhaps, your internet connection is too slow. You can download this library from
github
and import in your project.Here is
github
repository link: https://github.com/PhilJay/MPAndroidChartJust click on download button then select download ZIP and after downloading, copy the folder MPChartLib and paste into your project root directory and
compile
withgradle
.In your settings.gradle,
include ':app', ':MDChartLib'
andbuild.gradle(Module:app)
,compile project(':MDChartLib')