Add specific repository to build file
<p><strong>Problem:</strong> I would like to include that <a href="https://android-arsenal.com/details/1/2835" rel="nofollow noreferrer">library</a> to my project. When I add the dependency I get: </p>

<blockquote>
  <p>Failed to resolve: com.github.glomadrian:loadingballs1.1</p>
</blockquote>

<p><strong>Question:</strong> How do I have to change my gradle file to solve the problem? I think it has something to do with adding the repository maven. If it is like that, where do I have to put it correctly?</p>

<p><strong>Note:</strong> I have found a <a href="https://stackoverflow.com/questions/28295933/difference-between-build-gradleproject-and-build-gradlemodule">post</a> that seems to answer my question but unfotunately I still get the issue. </p>

<p>The library gives a small tutorial: </p>

<blockquote>
  <p>Add the specific repository to your build file:</p>
</blockquote>

<p>Their sample code: </p>

<pre><code>repositories {
    maven {
        url "https://jitpack.io"
    }
}
</code></pre>

<p>I have added the maven repository to my build file like that: </p>

<p>build.gradle (Project)</p>

<pre><code>   buildscript {
    repositories {
        jcenter()

    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.1.2'

        //Maven plugin
        classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
    }

}

task clean(type: Delete) {
    delete rootProject.buildDir
}
</code></pre>

<p>build.gradle (Module:app)</p>

<pre><code>apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "com.stack.overflow"
        minSdkVersion 19
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    (...)
    compile 'com.github.glomadrian:loadingballs:1.1@aar'

}
</code></pre>