groovy 插件[id:'com.google.gms. google-services',版本:“5.0.0”,应用:false]未找到

p1iqtdky  于 8个月前  发布在  Go
关注(0)|答案(2)|浏览(98)

Android Studio更新到Giraffe我发现com.google.gms.google-serviceslatest version是5.0.0
当我尝试同步项目时,我得到这个错误:
插件[id:'com.google.gms. google-services',版本:“5.0.0”,应用: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'版本,一切正常。
如何克服这个错误?

jobtbby3

jobtbby31#

尝试将以下依赖项添加到根build.gradle文件:
classpath 'com.google.gms:google-services:5.0.0'

vfwfrxfs

vfwfrxfs2#

**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

相关问题