{"id":7741,"date":"2015-10-19T01:17:35","date_gmt":"2015-10-19T01:17:35","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2015\/10\/19\/proguard-not-working-with-okhttp-open-source-projects-square-okhttp\/"},"modified":"2015-10-19T01:17:35","modified_gmt":"2015-10-19T01:17:35","slug":"proguard-not-working-with-okhttp-open-source-projects-square-okhttp","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2015\/10\/19\/proguard-not-working-with-okhttp-open-source-projects-square-okhttp\/","title":{"rendered":"ProGuard not working with okhttp-open source projects square\/okhttp"},"content":{"rendered":"<p>ProGuard won&#8217;t play nice with okhttp and I keep getting the following Warnings:<\/p>\n<pre><code>Warning:com.squareup.okhttp.internal.huc.HttpsURLConnectionImpl: can't find referenced method 'long getContentLengthLong()' in program class com.squareup.okhttp.internal.huc.HttpURLConnectionImpl\nWarning:com.squareup.okhttp.internal.huc.HttpsURLConnectionImpl: can't find referenced method 'long getHeaderFieldLong(java.lang.String,long)' in program class com.squareup.okhttp.internal.huc.HttpURLConnectionImpl\nWarning:com.squareup.okhttp.internal.huc.JavaApiConverter$CacheHttpsURLConnection: can't find referenced method 'long getContentLengthLong()' in program class com.squareup.okhttp.internal.huc.JavaApiConverter$CacheHttpURLConnection\nWarning:com.squareup.okhttp.internal.huc.JavaApiConverter$CacheHttpsURLConnection: can't find referenced method 'long getHeaderFieldLong(java.lang.String,long)' in program class com.squareup.okhttp.internal.huc.JavaApiConverter$CacheHttpURLConnection\nWarning:there were 4 unresolved references to program class members.\n         Your input classes appear to be inconsistent.\n         You may need to recompile the code.\n         (http:\/\/proguard.sourceforge.net\/manual\/troubleshooting.html#unresolvedprogramclassmember)\n<\/code><\/pre>\n<p>These are my proguard settings for okhttp and retrofit:<\/p>\n<pre><code>-dontwarn rx.**\n\n-dontwarn okio.**\n\n-dontwarn com.squareup.okhttp.*\n\n-dontwarn retrofit.appengine.UrlFetchClient\n\n\n-keep class retrofit.** { *; }\n\n-keepclasseswithmembers class * {\n\n@retrofit.http.* ; }\n\n-keepattributes Signature \n-keepattributes *Annotation*\n<\/code><\/pre>\n<p>Could this have something to do with the changes to ProGuard in Android Studio 1.0?<\/p>\n<p>I tried the answers to related questions but they only suggested to use the settings I already have.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ProGuard won&#8217;t play nice with okhttp and I keep getting the following Warnings: Warning:com.squareup.okhttp.internal.huc.HttpsURLConnectionImpl: can&#8217;t find referenced method &#8216;long getContentLengthLong()&#8217; in program class com.squareup.okhttp.internal.huc.HttpURLConnectionImpl Warning:com.squareup.okhttp.internal.huc.HttpsURLConnectionImpl: can&#8217;t find referenced method &#8216;long getHeaderFieldLong(java.lang.String,long)&#8217; in program class com.squareup.okhttp.internal.huc.HttpURLConnectionImpl Warning:com.squareup.okhttp.internal.huc.JavaApiConverter$CacheHttpsURLConnection: can&#8217;t find referenced method &#8216;long getContentLengthLong()&#8217; in program class com.squareup.okhttp.internal.huc.JavaApiConverter$CacheHttpURLConnection Warning:com.squareup.okhttp.internal.huc.JavaApiConverter$CacheHttpsURLConnection: can&#8217;t find referenced method &#8216;long getHeaderFieldLong(java.lang.String,long)&#8217; in program [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7741","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7741","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=7741"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7741\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=7741"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=7741"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=7741"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}