提问人:Always Learner 提问时间:8/15/2023 更新时间:8/19/2023 访问量:209
插件 [id: 'com.google.gms.google-services', version: '5.0.0', apply: false] 找不到
Plugin [id: 'com.google.gms.google-services', version: '5.0.0', apply: false] was not found
问:
我今天将 Android Studio 更新为 Giraffe。我发现最新版本是 5.0.0com.google.gms.google-services
当我尝试同步项目时,出现以下错误:
插件 [id: 'com.google.gms.google-services', version: '5.0.0', apply: false] 在以下任何来源中均未找到
这是我所有的插件:
plugins {
id 'com.android.application' version '8.1.0' apply false
id 'com.android.library' version '8.1.0' apply false
id 'org.jetbrains.kotlin.android' version '1.9.0' apply false
id 'com.google.gms.google-services' version '5.0.0' apply false
}
如果我降级到“4.3.15”版本,一切正常。
如何克服这个错误?
答:
0赞
triegebauer
8/15/2023
#1
尝试将以下依赖项添加到根文件:build.gradle
classpath 'com.google.gms:google-services:5.0.0'
评论
0赞
Always Learner
8/15/2023
它也不起作用。我明白了.Could not find com.google.gms:google-services:5.0.0
0赞
Winneroo7
8/19/2023
#2
**1st Method**
Add this to gradle
implementation 'com.google.gms.google-services:com.google.gms.google-services.gradle.plugin:4.3.15'
**2nd Method**
-> Go to Project Structure
-> Dependencies then Library Dependencies
-> Click on + and Paste this com.google.gms.google-services
-> Tap on Search
-> Add available depe
评论