简体   繁体   中英

google firestore - get DuplicateFileException

Please give me advice. I've just followed this guide and from this line compile 'com.google.cloud:google-cloud-firestore:0.25.0-beta' nothing is working.

Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'. com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in 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.jar

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

But I haven't imports google-cloud-core in my gradle file. Here is output from 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'



}

The guide says:

Add the Cloud Firestore Android library to your app/build.gradle file:

compile 'com.google.firebase:firebase-firestore:11.4.2'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM