google-service.json丢失了

时间:2017-07-14 12:48:26

标签: android google-cloud-messaging gcmlistenerservice

我正在尝试使用GcmListnerService,并在gradle文件中添加了google服务所需的依赖项,如下所示。但是当我同步时,我收到以下错误:

Error:Execution failed for task ':appcompat:processReleaseGoogleServices'.
> File google-services.json is missing. The Google Services Plugin cannot function without it. 
Searched Location: 
C:\Users\aba\AndroidStudioProjects\MEN\appcompat\src\release\google-services.json
C:\Users\aba\AndroidStudioProjects\MEN\appcompat\google-services.json

为了解决这个问题,我发现类似的帖子建议生成一个配置文件',所以我生成了一个并下载了它。 现在,请你告诉我该怎么处理文件?该怎么做。

build.gradle app

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':appcompat')
compile project(':securepreferences')
compile 'com.android.support:support-v4:25.2.0' // .0.1

compile 'com.google.android.gms:play-services:11.0.2'
//    compile 'com.google.android.gms:play-services-maps:10.0.1'
//    compile 'com.google.android.gms:play-services-location:10.0.1'

// AVK 05.02.2017 compile 'com.github.chrisbanes.photoview:library:1.2.2'
compile 'com.google.code.gson:gson:2.7' // 2.4


compile 'com.squareup.picasso:picasso:2.4.0'
version: '1.9.0'

compile files('app/libs/android-viewbadger.jar')

compile files('gradle/wrapper/gradle-wrapper.jar')

}

build.gradle项目

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

0 个答案:

没有答案