我最近升级了我的Android Studio,我的AAPT2出现了错误。这个也不再发生了。我有一个新的。
请通过更新版本来修复版本冲突 google-services插件(有关最新版本的信息是 可在 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(项目):
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'
}
我在这里缺少什么?
答案 0 :(得分:3)
变化:
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服务都应该具有相同的版本。