java - 将 com.google.android.gms 的版本更新到 12.0.0

标签 java android firebase android-studio firebaseui

我最近升级了我的 Android Studio,首先我遇到了 AAPT2 错误。这一个也不再发生了。所以我有一个新的。

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 12.0.0.

但我已经使用了 12.0.0 版本。

build.gradle(应用程序):

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.google.firebase:firebase-core:12.0.1'
implementation 'com.google.firebase:firebase-messaging:12.0.1'
implementation 'com.google.firebase:firebase-auth:12.0.1'
implementation 'com.google.firebase:firebase-database:12.0.1'
implementation 'com.google.firebase:firebase-storage:12.0.1'
implementation 'com.jjoe64:graphview:4.2.1'
implementation 'org.apache.commons:commons-lang3:3.4'
implementation 'com.google.android.gms:play-services-location:12.0.0'
implementation 'com.google.android.gms:play-services-maps:12.0.0'
implementation 'com.google.android.gms:play-services-auth:12.0.1'
implementation 'com.google.android.gms:play-services-identity:12.0.0'
implementation 'com.firebaseui:firebase-ui-auth:3.3.0'
}

build.gradle(项目):

dependencies {
    classpath 'com.android.tools.build:gradle:3.1.0'
    classpath 'com.google.gms:google-services:3.2.1'
    classpath 'com.google.firebase:firebase-plugins:1.1.1'
}

我在这里错过了什么?

最佳答案

改变:

implementation 'com.google.android.gms:play-services-location:12.0.0'
implementation 'com.google.android.gms:play-services-maps:12.0.0'
implementation 'com.google.android.gms:play-services-identity:12.0.0'

为此:

implementation 'com.google.android.gms:play-services-location:12.0.1'
implementation 'com.google.android.gms:play-services-maps:12.0.1'
implementation 'com.google.android.gms:play-services-identity:12.0.1'

Firebase 和 google play 服务的版本应该相同。

关于java - 将 com.google.android.gms 的版本更新到 12.0.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49706312/

相关文章:

android - 如何在android中从互联网获取当前时间

swift - 需要有关 Firebase 数据结构的指导

java - 什么是NullPointerException,我该如何解决?

java - Knuth–Morris–Pratt 算法

java - 以正确的顺序将项目添加到 Set<String> Java

java - javax.persistence.metamodel.Map 和 java.util.Map 有什么区别?

Android 在 ViewPager 上打开 fragment

android - getActionView 使用 searchview 返回 null

android - 监听器 onDataChange Android Firebase

java - Firebase 未触发成功或失败