提问人:Neone 提问时间:5/14/2021 最后编辑:Neone 更新时间:5/15/2021 访问量:11981
插件 [id: 'com.google.gms.google-services'] 在以下任何来源中都找不到 [duplicate]
Plugin [id: 'com.google.gms.google-services'] was not found in any of the following sources [duplicate]
问:
我在项目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
答:
1赞
Faisal Khan
5/14/2021
#1
使用而不是版本,这可能是库的问题classpath 'com.google.gms:google-services:4.3.5'
4.3.7
评论
0赞
Neone
5/14/2021
仍在使用这个旧版本。只想使用最新版本..
5赞
vkryachko
5/15/2021
#2
请改用版本,有关上下文,请参阅此 github 问题4.3.8
评论
0赞
Neone
5/15/2021
但它会出现在 maven 存储库上吗?mvnrepository.com/artifact/com.google.gms/......
评论
gradle plugin