如何修复错误:找不到com.google.gms:google-services:3.0.0。?

斯科特

我正在尝试在我的应用程序中添加Firebase addmob。

在build.gradle(Project)中,我有以下代码

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.google.gms: google-services: 3.0.0'
        classpath 'com.android.tools.build:gradle:2.1.3'

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

在build.gradle(模块)

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "24.0.2"

    defaultConfig {
        applicationId "com.myname.examp.myapp"
        minSdkVersion 14
        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.android.support:appcompat-v7:23.0.0'
    compile 'com.android.support:design:23.0.0'
    compile 'com.google.firebase: firebase-ads: 9.0.0'
}
apply plugin: 'com.google.gms.google-services'

我已经更新了Google Play服务和存储库的版本 在此处输入图片说明

当我仍然同步项目时,出现以下错误

Error:Could not find com.google.gms: google-services: 3.0.0.
Searched in the following locations:
    file:/C:/Program Files/Android/Android Studio2/gradle/m2repository/com/google/gms/ google-services/ 3.0.0/ google-services- 3.0.0.pom
    file:/C:/Program Files/Android/Android Studio2/gradle/m2repository/com/google/gms/ google-services/ 3.0.0/ google-services- 3.0.0.jar
    https://jcenter.bintray.com/com/google/gms/ google-services/ 3.0.0/ google-services- 3.0.0.pom
    https://jcenter.bintray.com/com/google/gms/ google-services/ 3.0.0/ google-services- 3.0.0.jar
Required by:
    :MyApplication:unspecified

可以帮我解决这个错误吗

Aman Jain |

请添加google-services.json您的应用程序文件夹。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

错误:找不到com.google.gms.google-services:4.2.0

Bitrise错误找不到com.google.gms:google-services:3.2.1

错误:找不到com.google.gms:google-services:4.2.0

更新后-错误:找不到:com.google.android.gms:play-services:5.2.8

错误:找不到 com.google.android.gms:play-services:10.2.0

错误:将Firebase导入代码示例时找不到com.google.gms:google-services:3.0.0

找不到ID为“ com.google.gms:google-services”的插件。扑

找不到参数[com.google.gms:google-services:3.0.0]的方法classpath()

找不到com.google.gms:google-services:4.1.0。在以下位置搜索:

找不到参数[com.google.gms:google-services:4.0.0]的方法compile()

无法应用插件“ com.google.gms.google-services”

应用插件时出错:“ com.google.gms.google-services”

错误:找不到com.google.gms:google-services:1.0。在android studio的build.gradle中添加google服务插件时

找不到参数[com.google.android.gms:play-services-base:16.0.1]的方法Implementation()

找不到参数[com.google.android.gms:play-services-gcm:7.5.0]的方法complie()

找不到com.google.android.gms:play-services:7.3.0

Gradle同步失败:找不到ID为'com.google.android.gms:play-services'的插件

react-native-camera:找不到com.google.android.gms:play-services-vision:16.0.0

CircleCI 构建获取“找不到 com.google.android.gms:play-services-identity:11.0.1”

找不到依赖项com.google.android.gms:play-services-ads-lite:[10.2.4]

找不到com.google.android.gms:play-services-analytics:8.1.0

找不到与com.google.android.gms:play-services-plus:+相匹配的任何版本

找不到com.google.android.gms:play-services:8.4.0

Gradle找不到依赖项com.google.android.gms:play-services

找不到com.google.android.gms:play-services-cast:9.0.0

更新到最新版本 4.3.7 后找不到 ID 为“com.google.gms.google-services”的插件

com.google.gms:google-services:4.3.4选择了不正确的google-services.json

更改com.google.android.gms:play-services的版本

找不到play-services-tasks-license.aar(com.google.android.gms:play-services-tasks-license:11.8.0)