android - 在旧源代码上添加 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'
}
}
解决方案
推荐阅读
- amazon-web-services - 使用 S3 存储桶 zip 捆绑代码自动化 Lambda 部署
- github-actions - 在 GitHub Actions 中是否可以将步骤传递给子操作?
- mysql-5.7 - mysql工作台的客户端连接信息栏总是显示NULL
- r - 我有一个庞大的数据集,其中缺少一些日期。我很难创建时间序列模型
- java - SQL 异常:位置 3 JAVA 不支持的标记
- jenkins - Jenkinsfile 显示 fortfiy 扫描结果
- c - 宏没有产生所需的结果
- angular - 获取 app-component 中的动态路由参数值,并将其添加到 Angular 12 中应用程序的每个路由中
- javascript - 声明并传入函数时的节点js内存使用情况
- django - 我希望用户可以在不登录的情况下使用下拉菜单更改网站语言,但如果他们登录网站应该翻译为他们保存的语言首选项