Http://stackoverflow.com/questions/23077521/where-and-why-add-repositories-on-build-gradle
https://jitpack.io/
1. ADD repository in top level Gradle file
//top-level build file where can add configuration options common to all sub-projects/modules.Buildscript {repositories {jcenter ()//Don't add here} dependencies {classpath' com.android.tools.build:gradle:0.12.2 '//Note:do not place your application dependencies here; they belong//In the individual module build.gradle files}}allprojects {repositories {jcenter ()//Add repository heremaven {URL"Https://jitpack.io" } }}
2. Add dependency to module level Gradle file
Apply plugin: ' com.android.application ' android {compilesdkversion 19 Span style= "color: #000000;" > buildtoolsversion "20.0.0" Defaultconfig {ApplicationID " app.t Absample " minsdkversion 14 Targetsdkversi On 14 false Proguardfiles getdefaultproguardfile ( ' proguard-android.txt ') , ' Proguard-rules.txt ' }}}dependencies {compile ' com.android.support:a ppcompat-v7:20.0.0 ' // add dependency here compile ' com.github.philjay:mpandroidchart:v2.1.3 ' '
Add a dependency in Android Studio