0

I want to add an admob banner to my android app but I can't add this dependencies. Can you help me please

compile 'com.google.android.gms:play-services-ads:11.2.0'

This is the code

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.2.0'
    compile 'com.android.support:design:23.2.0'
    compile 'com.google.android.gms:play-services-ads:11.2.0'
}

I got this error

Error:(26, 13) Failed to resolve: com.google.android.gms:play-services-ads:11.2.0
<a href="install.m2.repo">Install Repository and sync project</a><br><a href="openFile:D:/WorldOfKids/app/build.gradle">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>
clara
  • 11
  • 1
  • 6

1 Answers1

0

Check out your project-level build.gradle file. It should have maven directive

allprojects {
repositories {
    jcenter()
    maven {
        url "https://maven.google.com"
    }
}
}