Gradle无法下载com.google.android.gms play-services-ads / 15.0.0 / play-services-ads.pom

时间:2018-06-27 18:05:32

标签: android android-studio android-gradle admob build.gradle

我正在尝试将admob横幅广告添加到android应用中。但是当我把 依赖项中的“ implementation'com.google.android.gms:play-services-ads:15.0.0'”该gradle无法下载它。 安妮帮助

 // Top-level build file where you can add configuration options common to all 
  sub-projects/modules.

buildscript {

  repositories {
    google()
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.0.0'


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

allprojects {
repositories {
    google()
    jcenter()
   }
 }

 task clean(type: Delete) {
  delete rootProject.buildDir
 }  

3 个答案:

答案 0 :(得分:0)

使用implementation 'com.google.android.gms:play-services-ads:15.0.1'而不是15.0.0

还要分享更多细节,以便我们提供更准确的答案

答案 1 :(得分:0)

itry 实施'com.google.android.gms:play-services-ads:15.0.1' 实施'com.google.firebase:firebase-ads:15.0.1'/ '11 .8.0' 再次无法下载!
Main screen of an empty project

[SDK工具][2] [建立空项目的阶梯][3]

答案 2 :(得分:0)