请给我建议。我刚刚关注此guide并从此行compile 'com.google.cloud:google-cloud-firestore:0.25.0-beta'
开始
什么都没有用。
错误:任务':app:transformResourcesWithMergeJavaResForDebug'执行失败。 com.android.build.api.transform.TransformException:com.android.builder.packaging.DuplicateFileException:在APK project.properties中复制的重复文件
File1:C:\ some.gradle \ _caches \ modules-2 \ files-2.1 \ com.google.cloud \ google-cloud-core \ 1.7.0 \ 453cc89cde3f2896825aecfb4d05dc2ba06f9775 \ google-cloud-core-1.7.0。罐
File2:C:\ some.gradle \ caches \ modules-2 \ files-2.1 \ com.google.cloud \ google-cloud-firestore \ 0.25.0-beta \ 7258a705784332ebc9be97f28be93b3e6548073f \ google-cloud-firestore-0.25。 0-beta.jar
但我还没有在google-cloud-core
文件中导入gradle
。这是gradle
:
dependencies{
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.cloud:google-cloud-firestore:0.25.0-beta'
compile 'com.android.support:appcompat-v7:25.1.1'
compile 'com.android.support:design:25.1.1'
compile 'com.android.support:support-v4:25.1.1'
compile 'com.android.support:recyclerview-v7:25.1.1'
compile 'com.android.support:cardview-v7:25.1.1'
compile 'com.android.support:gridlayout-v7:25.1.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.firebase:firebase-auth:10.2.1'
compile 'com.google.firebase:firebase-database:10.2.1'
compile 'com.google.firebase:firebase-core:10.2.1'
compile 'com.google.firebase:firebase-ads:10.2.1'
compile 'com.google.firebase:firebase-crash:10.2.1'
compile 'com.google.android.gms:play-services-auth:10.2.1'
testCompile 'junit:junit:4.12'
}
答案 0 :(得分:2)
指南说:
将Cloud Firestore Android库添加到app/build.gradle
文件中:
compile 'com.google.firebase:firebase-firestore:11.4.2'