【发布时间】:2016-11-26 03:36:06
【问题描述】:
大家好,我有一个项目,我今天在导入 speedchecker 库后从 eclipse 迁移到 android studio,因为它显示了
speedchecker-android-sdk-1.2.jar
httpcore-4.3-beta1.jar
httpclient-4.3-beta1.jar
httpclient-cache-4.3-beta1.jar
httpmime-4.3-beta1.jar
在某些类上存在冲突。这些是我的依赖项
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:multidex:1.0.1'
compile('com.octo.android.robospice:robospice-google-http-client:1.4.14') {
exclude module: 'commons-io'
exclude group: 'org.apache.commons'
}
compile('com.google.http-client:google-http-client-jackson2:1.19.0') {
exclude module: 'commons-io'
exclude module: 'xpp3'
exclude group: 'stax'
}
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.google.android.gms:play-services-gcm:8.4.0'
compile 'com.google.code.gson:gson:2.6.2'
compile files('libs/activation.jar')
//conflict in here
compile files('libs/speedchecker-android-sdk-1.2.jar')
compile files('libs/httpcore-4.3-beta1.jar')
compile files('libs/httpclient-4.3-beta1.jar')
compile files('libs/httpclient-cache-4.3-beta1.jar')
compile files('libs/httpmime-4.3-beta1.jar')
compile files('libs/additionnal.jar')
compile files('libs/facebook1.jar')
compile files('libs/mail.jar')
compile files('libs/universal-image-loader-1.9.5.jar')
compile files('libs/gcm.jar')
}
你能帮帮我吗
【问题讨论】:
-
使用
app:dependencies查看依赖树。通常会指出堆栈跟踪中哪个类发生冲突。搜索那个并将其从您的依赖项之一中排除。 -
如何从jar文件的依赖中排除一个类,以及如何查看这个应用:依赖
-
我觉得可能是 facebook1.jar 或 gcm.jar 与您的播放服务冲突
标签: java android eclipse android-studio