首页 > 解决方案 > 在旧源代码上添加 firebase 分析,重复条目:com/google/android/gms/security/ProviderInstaller

问题描述

添加后,我需要在旧的 android 源代码中添加 firebase 分析功能compile 'com.google.firebase:firebase-core:15.0.0'
我收到此错误。

 duplicate entry: com/google/android/gms/security/ProviderInstaller.class

我已经这样做了,

 compile ('com.google.firebase:firebase-core:15.0.0'( {
     exclude group: 'com.google.android.gms'
 }  

但是firebase要求提供一个先决条件库

dependencies {
compile('org.apache.commons:commons-io:1.3.2') {
    exclude module: 'commons-io'
}
compile 'org.apache.httpcomponents:httpclient-android:4.3.5.1'
compile('org.apache.httpcomponents:httpmime:4.3') {
    exclude module: "httpclient"
}
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:design:24.2.1'
compile 'com.android.support:support-v4:24.2.1'
compile 'com.google.android.gms:play-services-base:15.0.1'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.google.maps.android:android-maps-utils:0.3.4'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.7.5'
compile 'com.squareup.okhttp:okhttp:2.7.5'
compile 'com.google.guava:guava:18.0'
compile 'com.android.support:multidex:1.0.1'
compile 'de.greenrobot:eventbus:2.4.0'
compile 'org.jsoup:jsoup:1.9.2'
//Helper
compile 'com.github.jkwiecien:EasyImage:2.0.2'
compile 'biz.kasual:materialnumberpicker:1.2.1'
//UI
compile 'com.rengwuxian.materialedittext:library:2.0.3'
compile 'com.jpardogo.materialtabstrip:library:1.1.0'
compile 'com.jakewharton:butterknife:7.0.1'
compile files('libs/crittercism_v4_5_3_sdkonly.jar')
compile ('com.google.firebase:firebase-analytics:16.0.1'){
    exclude group: 'com.google.android.gms'

compile 'com.android.support:support-v4:20.0.0'
compile 'com.parse.bolts:bolts-android:1.1.2'
}
}

标签: androidfirebase-analytics

解决方案


推荐阅读