首页 > 解决方案 > Gradle 无法下载 com.google.android.gms play-services-ads/15.0.0/play-services-ads.pom

问题描述

我正在尝试将 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
 }  

标签: androidandroid-studioandroid-gradle-pluginadmobbuild.gradle

解决方案


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

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


推荐阅读