在以下任何来源中都找不到插件 [id: 'com.google.gms.google-services']
Plugin [id: 'com.google.gms.google-services'] was not found in any of the following sources
我在项目 gradle:
中使用此版本 没有错误
classpath 'com.google.gms:google-services:4.3.5'
但是当我改成4.3.7:
Plugin [id: 'com.google.gms.google-services'] was not found in any of the following sources:
* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Exception is:
org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'com.google.gms.google-services'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (plugin dependency must include a version number for this source)
App gradle 开头(错误来自第 4 行):
plugins {
id 'com.android.application'
id 'com.getkeepsafe.dexcount'
id 'com.google.gms.google-services'
id 'com.google.firebase.firebase-perf'
id 'com.google.firebase.crashlytics'
id 'kotlin-android'
id 'kotlin-kapt'
id 'kotlin-parcelize'
}
项目 gradle 开始于:
buildscript {
ext.kotlin_version = '1.5.0'
repositories {
google()
mavenCentral()
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.1'
classpath 'com.google.gms:google-services:4.3.7'
classpath "com.getkeepsafe.dexcount:dexcount-gradle-plugin:2.1.0-RC01"
classpath "com.google.firebase:perf-plugin:1.4.0"
classpath "com.google.firebase:firebase-crashlytics-gradle:2.6.1"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
在 Google maven 存储库中存在此版本,但我无法以某种方式应用它:https://maven.google.com/web/index.html?q=google-services#com.google.gms:google-services:4.3.7
我尝试在 gradle-wrapper.properties
使用最新的 gradle 6.9、7.0 和 7.0.1
使用classpath 'com.google.gms:google-services:4.3.5'
而不是版本 4.3.7
这可能是库的问题
请改用版本 4.3.8
,有关上下文,请参阅此 github issue
我在项目 gradle:
中使用此版本 没有错误classpath 'com.google.gms:google-services:4.3.5'
但是当我改成4.3.7:
Plugin [id: 'com.google.gms.google-services'] was not found in any of the following sources:
* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Exception is:
org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'com.google.gms.google-services'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (plugin dependency must include a version number for this source)
App gradle 开头(错误来自第 4 行):
plugins {
id 'com.android.application'
id 'com.getkeepsafe.dexcount'
id 'com.google.gms.google-services'
id 'com.google.firebase.firebase-perf'
id 'com.google.firebase.crashlytics'
id 'kotlin-android'
id 'kotlin-kapt'
id 'kotlin-parcelize'
}
项目 gradle 开始于:
buildscript {
ext.kotlin_version = '1.5.0'
repositories {
google()
mavenCentral()
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.1'
classpath 'com.google.gms:google-services:4.3.7'
classpath "com.getkeepsafe.dexcount:dexcount-gradle-plugin:2.1.0-RC01"
classpath "com.google.firebase:perf-plugin:1.4.0"
classpath "com.google.firebase:firebase-crashlytics-gradle:2.6.1"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
在 Google maven 存储库中存在此版本,但我无法以某种方式应用它:https://maven.google.com/web/index.html?q=google-services#com.google.gms:google-services:4.3.7
我尝试在 gradle-wrapper.properties
使用最新的 gradle 6.9、7.0 和 7.0.1使用classpath 'com.google.gms:google-services:4.3.5'
而不是版本 4.3.7
这可能是库的问题
请改用版本 4.3.8
,有关上下文,请参阅此 github issue