我用我的应用程序和一些错误的改造和Okhttp都被赶了出来很好地工作,首先我排除在改造和okhttp奥基奥和GSON解决我编译,但它无法正常工作精致,它使带来的误差,每次这是错误:执行失败的任务“:应用程序:transformClassesWithJarMergingForDebug”。 > com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复的条目:COM /谷歌/ GSON /注释/ Expose.class另一次它将带来的是奥基奥作为奥基奥/ asyncTimeout,我该如何解决这个问题?改造和Okhttp不会对我的应用
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile files('libs/mobilesec.jar')
compile files('libs/org-apache-commons-codec.jar')
compile files('libs/apache-commons-lang.jar')
compile files('libs/core-1.51.0.0.jar')
compile files('libs/gson-2.0.2.jar')
compile files('libs/okio-1.2.0.jar')
compile files('libs/sqliteassethelper-2.0.1.jar')
compile 'com.android.support:support-v4:21.+'
compile 'com.android.support:appcompat-v7:21.+'
compile files('libs/gcm.jar')
compile 'com.crittercism:crittercism-android-agent:+'
compile 'com.google.android.gms:play-services-wearable:6.5.87'
compile ('com.squareup.okhttp3:logging-interceptor:3.2.0'){
exclude module: 'com.squareup.okio'
}
compile 'com.android.support:multidex:1.0.0'
}
你真的需要的okhttp依赖。据我所知Retrofit建立在okhttp之上。 – Vall0n
那么人们通常使用Gradle来完成他们的依赖关系而不是随机jar – EpicPandaForce