gpt4 book ai didi

安卓工作室 : Execution failed for task ":app:processDebugGoogleServices" error after added Firebase Storage

转载 作者:行者123 更新时间:2023-11-29 02:40:11 32 4
gpt4 key购买 nike

我刚刚将代码添加到我的 Android Studio 项目以使用 Firebase 存储并收到此错误:

Execution failed for task ':app:processDebugGoogleServices'. Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 10.0.1.

这是我的 app/build.gradle 文件:

apply plugin: 'com.android.application'

android {
compileSdkVersion 26
buildToolsVersion "26.0.0"
defaultConfig {
applicationId "myappIDhere"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile files('libs/commons-codec-1.10/commons-codec-1.10.jar')
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:26.+'
compile 'com.google.gms:google-services:3.1.0'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.google.firebase:firebase-storage:11.0.1'
testCompile 'junit:junit:4.12'
}

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

这是我的项目级 build.gradle 文件:

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.google.gms:google-services:3.1.0'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}

google-services.json 文件中的 package_name 与 list 中的相同。我需要更改什么?

最佳答案

只需更新您的依赖项

 compile 'com.google.firebase:firebase-auth:11.0.1'
compile 'com.google.firebase:firebase-database:11.0.1'
compile 'com.google.firebase:firebase-storage:11.0.1'

关于安卓工作室 : Execution failed for task ":app:processDebugGoogleServices" error after added Firebase Storage,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44732522/

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