【发布时间】:2018-11-14 20:21:46
【问题描述】:
我尝试将我的项目与 Gradle 文件同步时出错
这是错误
错误:任务 ':app:processDebugGoogleServices' 执行失败。不 为包名称“com.xx.xxx.xxxx”找到匹配的客户端
这是我的 Gradle 文件内容:
apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'
android {
compileSdkVersion 26
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "com.xx.xxx.xxxx"
minSdkVersion 19
targetSdkVersion 22
versionCode 1
versionName "1.0.3"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
useLibrary 'org.apache.http.legacy'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile 'com.android.support:support-v4:26.1.0'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:design:26.1.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.google.firebase:firebase-core:11.0.4'
compile 'com.google.firebase:firebase-messaging:11.0.4'
compile 'com.google.firebase:firebase-database:11.0.4'
compile 'com.google.android.gms:play-services-maps:11.0.4'
compile 'de.hdodenhof:circleimageview:2.0.0'
compile 'com.jakewharton:butterknife:7.0.1'
provided 'org.projectlombok:lombok:1.12.6'
compile 'org.parceler:parceler-api:1.0.4'
apt 'org.parceler:parceler:1.0.4'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.4.1'
compile 'com.squareup.okhttp3:okhttp:3.4.1'
compile 'io.reactivex:rxandroid:1.1.0'
compile 'io.reactivex:rxjava:1.1.0'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
compile 'com.google.maps:google-maps-services:0.2.5'
compile 'org.slf4j:slf4j-nop:1.7.25'
compile 'com.android.support:cardview-v7:26.1.0'
compile 'com.cocosw:bottomsheet:1.+@aar'
}
apply plugin: 'com.google.gms.google-services'
我已经检查了我的 google-service 文件包名称和应用程序 ID,两者都是相同的,但是当我尝试构建应用程序时,发生了上述错误。我的 google-services 文件包含多个项目,包括这个。
请帮我解决它。
【问题讨论】:
-
如果对你有帮助,请查看我的回答,如果你也提供和 app grandle 那就太好了
-
签出我给出的简单解决方案,希望对您有所帮助
标签: android firebase push-notification google-cloud-messaging