我最近升级了我的Android Studio,首先我遇到了AAPT2错误。这个不再发生。因此,我有一个新的。
请通过更新版本来修复版本冲突 谷歌服务插件(有关最新版本的信息是 可在 https://bintray.com/android/android-tools/com.google.gms.google-services/( 或将 com.google.android.gms 的版本更新到 12.0.0。
但是我已经使用了12.0.0版本。
build.gradle (app(:
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 (Project(:
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服务应该具有相同的版本。