我用我的應用程序和一些錯誤的改造和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