gpt4 book ai didi

javascript - 请通过使用 Firebase 使用 Google 更新我的 gradle 来修复版本冲突

转载 作者:行者123 更新时间:2023-11-29 19:12:23 25 4
gpt4 key购买 nike

将我的 google play 服务更新到 Firebase 后,我收到此错误。我不确定为什么会发生这种情况,因为它之前工作正常。

此消息不断出现:

Error: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 9.0.0.

这是我的build.gradle文件

apply plugin: 'com.android.application'

android {
compileSdkVersion 24
buildToolsVersion '25.0.0'

defaultConfig {
applicationId "com.transcendencetech.juliospizzaprototype"
minSdkVersion 10
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
apply plugin: 'com.google.gms.google-services'



compile 'com.android.support:appcompat-v7:24.1.1'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.google.firebase:firebase-core:10.0.1'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.google.firebase:firebase-storage:10.0.1'
compile 'com.firebaseui:firebase-ui:0.4.4'
testCompile 'junit:junit:4.12'
}



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

// Top-level build file where you can add configuration options common to all sub-projects/modules.

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

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

allprojects {
repositories {
jcenter()
}
}

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

最佳答案

https://firebase.google.com/docs/android/setup#manually_add_firebase

在您的 app/build.gradle 文件中:

dependencies {
...
}

移动这一行:apply plugin: 'com.google.gms.google-services' 到外面。

文档指示您将该行放在最底部。

关于javascript - 请通过使用 Firebase 使用 Google 更新我的 gradle 来修复版本冲突,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44876121/

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