2016-11-15 8 views
3

Ich erstelle eine App mit Retrofit 2.1.0 und OkHttp 3.4.2.ProtocolException mit Proguard und OkHttp 3.0:

Im Debug-Modus mit minifyEnabled auf false gesetzt alles perfekt funktioniert, aber sobald ich auf true i die folgende Ausnahme erhalten minifyEnabled ändern:

HTTP FAILED: java.net.ProtocolException: Too many follow-up requests: 21 

Meine Proguard Regeln für OkHttp sind wie folgt:

-keep class com.squareup.okhttp3.** { 
    *; 
} 
-dontwarn okhttp3.** 
-dontwarn okio.** 

Ich kann nicht verstehen, warum diese Ausnahme ausgelöst wird, und ich verstehe nicht, warum die App scheint 21 Folgeanfragen zu machen. Kann mir jemand helfen?

Antwort

-1

Verwendung thi in ur proguard Rollen:

-dontwarn com.squareup.okhttp.internal.huc.** 
-dontwarn com.squareup.okhttp.** 
-dontwarn com.squareup.okhttp3.** 
-dontwarn okio.** 
-dontwarn retrofit2.** 
-dontwarn org.codehaus.mojo.** 
-keep class retrofit2.** { *; } 
-keepattributes Signature 
-keepattributes Exceptions 
-keepattributes *Annotation*