昨天,我更新了我的谷歌服务gradle这个插件来此:获取gradle这个例外更新到com.google.gms后:谷歌服务:3.0.0
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
classpath 'com.google.gms:google-services:3.0.0'
}
在那之后,我在我得到以下错误我devDebug
味构建:
Error:org.gradle.api.GradleException: No matching client found for package name 'com.example.android.dev'
这里是我的应用程序级别的相关部分build.gradle
文件:
defaultConfig {
applicationId 'com.example.android'
multiDexEnabled true
minSdkVersion 16
targetSdkVersion 24
versionCode 47
versionName "1.3.2"
signingConfig signingConfigs.myConfig
renderscriptTargetApi 24
renderscriptSupportModeEnabled true
}
buildTypes {
debug {
applicationIdSuffix = ".dev"
resValue "string", "app_name", "example-debug"
}
release {
minifyEnabled false
shrinkResources false
resValue "string", "app_name", "example"
signingConfig signingConfigs.myConfig
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
dev {
// dev utilizes minSDKVersion = 21 to allow the Android gradle plugin
// to pre-dex each module and produce an APK that can be tested on
// Android Lollipop without time consuming dex merging processes.
minSdkVersion 21
}
prod {
// The actual minSdkVersion for the application.
minSdkVersion 16
}
}
此错误不进来我prodRelease
产品风味的构建。我该如何解决它?
你的调试版本比你的生产版本不同的应用程序ID。在Firebase控制台中添加一个包含该应用ID的Android应用,并获取新的配置JSON。 –
@EugenPechanec如果我使用调试构建应用程序ID进行注册,它是否可以在所有构建类型和风格中使用? –
google-services.json将包含下载时来自控制台的所有信息,所以是的。 –