gpt4 book ai didi

android - 使用 com.google.gms 时出错 : google-services: 4. 3.4

转载 作者:行者123 更新时间:2023-12-05 00:04:17 25 4
gpt4 key购买 nike

我正在尝试将 Firebase 项目连接到我的应用程序。但是,当我添加“classpath”com.google.gms: google-services: 4.3.4"AS 时出现此错误:

原因:无法找到请求目标的有效证书路径

我该怎么办?

build.gradle:

  apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.0.1"
classpath 'com.google.gms:google-services:4.3.3'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
google()
jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

build.gradle(app):

 android {
compileSdkVersion 30
buildToolsVersion "29.0.3"

defaultConfig {
applicationId "com.vogella.findpeople"
minSdkVersion 14
targetSdkVersion 30
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}


dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
implementation 'androidx.annotation:annotation:1.1.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'


implementation 'com.google.firebase:firebase-auth:19.4.0'
implementation 'com.google.firebase:firebase-database:19.5.0'
}

最佳答案

我标记的链接应该适合您。试试这个

classpath 'com.google.gms:google-services:4.3.3'

用这个替换你的类路径并重新同步。

关于android - 使用 com.google.gms 时出错 : google-services: 4. 3.4,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64185725/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com