You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I do get warnings using OkHttp3 & ProGuard :
(with gradle : compile 'com.squareup.okhttp3:okhttp:3.2.0' & compile 'com.squareup.okhttp3:okhttp-urlconnection:3.2.0')
Warning: okhttp3.internal.huc.HttpsURLConnectionImpl: can't find referenced method 'long getContentLengthLong()' in program class okhttp3.internal.huc.HttpURLConnectionImpl
Warning: okhttp3.internal.huc.HttpsURLConnectionImpl: can't find referenced method 'long getHeaderFieldLong(java.lang.String,long)' in program class okhttp3.internal.huc.HttpURLConnectionImpl
Which is "kind of normal" since in package okhttp3/internal/huc on branch okhttp_32, the class HttpsURLConnectionImpl.java has some strange code line 75 : method getContentLengthLong() exist neither in HttpURLConnectionImpl.java, nor in DelegatingHttpsURLConnection.java.
It may be related to this other issue?
Anyway, in my case, ignoring these 2 warnings with -dontwarn okhttp3.internal.huc.HttpURLConnectionImpl seems to be sufficient. I do get some other warnings with okio though (about some classes in package java.nio.file).
Edit: It worked, even with proguard-android-optimize.txt used. But it's odd that the class names are not obfuscated though when I pass it via ClassyShark.
jaredsburrows, danielgomezrico, JakeWharton, FrantisekSpurny, maayanGitHub and 8 moreAdnan9011 and iamdual
Activity
JakeWharton commentedon Jan 12, 2016
Change
com.squareup.okhttp
tookhttp3
in each.Add rules for okhttp3
ThomasSunderland commentedon Apr 8, 2016
Question: Isn't there an asterisk missing before the semicolon in the line...
-keep class com.squareup.okhttp.** { ;}
ganeshkrishnan1 commentedon Apr 21, 2016
@ThomasSunderland
Yes that's correct. It should be
swankjesse commentedon Apr 21, 2016
(The package name is
okhttp3
with nocom.squareup
prefix.)wingsum93 commentedon Apr 21, 2016
OkHttp3
-keepattributes Signature
-keepattributes Annotation
-keep class okhttp3.* { ; }
-keep interface okhttp3.* { ; }
-dontwarn okhttp3.
it is all corect for okhttp3
JakeWharton commentedon Apr 21, 2016
Those rules are massively over matching. As far as I can tell you don't
need any ProGuard rules for OkHttp.
On Thu, Apr 21, 2016, 5:08 AM eric ho notifications@github.com wrote:
mfaust35 commentedon May 24, 2016
I do get warnings using OkHttp3 & ProGuard :
(with gradle : compile 'com.squareup.okhttp3:okhttp:3.2.0' & compile 'com.squareup.okhttp3:okhttp-urlconnection:3.2.0')
Which is "kind of normal" since in package okhttp3/internal/huc on branch
okhttp_32
, the class HttpsURLConnectionImpl.java has some strange code line 75 : methodgetContentLengthLong()
exist neither inHttpURLConnectionImpl.java
, nor inDelegatingHttpsURLConnection.java
.It may be related to this other issue?
Anyway, in my case, ignoring these 2 warnings with
-dontwarn okhttp3.internal.huc.HttpURLConnectionImpl
seems to be sufficient. I do get some other warnings with okio though (about some classes in package java.nio.file).peterbetos commentedon Jul 29, 2016
Here's the correct format:
JakeWharton commentedon Jul 29, 2016
Those rules are crazy. You might as well just turn off ProGuard if you're
going to keep 100% of libraries.
On Thu, Jul 28, 2016, 6:31 PM Pier Betos notifications@github.com wrote:
peterbetos commentedon Jul 29, 2016
Fine, we can just use the following then:
Edit: It worked, even with proguard-android-optimize.txt used. But it's odd that the class names are not obfuscated though when I pass it via ClassyShark.
4 remaining items