在我們的應用程序最新版本的build.gradle的依賴關係,我們使用改裝用於具有以下依賴關係網絡:的改造和okhttp
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
近來我們開始得到這個crash已解決。那麼我如何在我們的應用程序中修復這個問題 我的理解是,改造是建立在okHttp庫之上的。 那麼,這是否意味着我們將不得不等待改造的新版本,其中包括新的okHttp版本,或者我可以手動okHttp的新版本作爲單獨扶養,並結了:
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
compile 'com.squareup.okhttp3:okhttp:3.8.1'
Proguard的配置是(雖然只改造部分)
-dontnote retrofit2.Platform
-dontwarn retrofit2.Platform$Java8
-dontwarn okhttp3.**
-dontwarn retrofit2.**
-dontwarn com.squareup.picasso.**
-keep class retrofit2.** { *; }
-keepattributes Signature
-keepattributes Exceptions
-keepclasseswithmembers class * { @retrofit2.http.* <methods>; }
-keepclasseswithmembers interface * { @retrofit2.* <methods>; }
-dontwarn okio.**
你已經包含的依賴包含'okhttp'庫。最有可能的是,你的proguard文件不正確。你能把它粘貼在這裏嗎? – Yashasvi
這是關於okhttp庫,它固定在3.8.1版本只是將其添加到您的gradle –
@OussemaAroua如果我正確理解,當我包括改造它已經內置okHttp可能是3.8.0版本的例如。不包括3.8.1手動導致衝突/問題。 – AndroidNoob