performance - Getting com.loopj.android.http.AsyncHttpClient after enabling Proguard -


i have read this, looks known issue quite time. not receiving warning or crash when not using pro-guard. after enabling it, receiving around 500 warnings following;

warning:com.loopj.android.http.asynchttpclient: can't find referenced class cz.msebera.android.httpclient

i have tried following, still of warnings there.

android {      compilesdkversion 24     buildtoolsversion "24.0.3"     uselibrary 'org.apache.http.legacy'  } 

i not using http-client library, there may other library using in project using this.

warnings

warning:com.loopj.android.http.rangefileasynchttpresponsehandler: can't find referenced class cz.msebera.android.httpclient.httpresponse warning:com.loopj.android.http.rangefileasynchttpresponsehandler: can't find referenced class cz.msebera.android.httpclient.header warning:com.loopj.android.http.rangefileasynchttpresponsehandler: can't find referenced class cz.msebera.android.httpclient.statusline warning:com.loopj.android.http.rangefileasynchttpresponsehandler: can't find referenced class cz.msebera.android.httpclient.httpresponse warning:com.loopj.android.http.rangefileasynchttpresponsehandler: can't find referenced class cz.msebera.android.httpclient.httpentity warning:com.loopj.android.http.rangefileasynchttpresponsehandler: can't find referenced class cz.msebera.android.httpclient.client.methods.httpurirequest warning:com.loopj.android.http.requestparams: can't find referenced class cz.msebera.android.httpclient.protocol.http warning:com.loopj.android.http.requestparams: can't find referenced class cz.msebera.android.httpclient.message.basicnamevaluepair warning:com.loopj.android.http.requestparams: can't find referenced class cz.msebera.android.httpclient.client.entity.urlencodedformentity warning:com.loopj.android.http.requestparams: can't find referenced class cz.msebera.android.httpclient.message.basicnamevaluepair warning:com.loopj.android.http.requestparams: can't find referenced class cz.msebera.android.httpclient.client.utils.urlencodedutils warning:com.loopj.android.http.requestparams: can't find referenced class cz.msebera.android.httpclient.message.basicnamevaluepair warning:com.loopj.android.http.requestparams: can't find referenced class cz.msebera.android.httpclient.client.utils.urlencodedutils warning:com.loopj.android.http.requestparams: can't find referenced class cz.msebera.android.httpclient.message.basicnamevaluepair warning:com.loopj.android.http.requestparams: can't find referenced class cz.msebera.android.httpclient.httpentity warning:com.loopj.android.http.requestparams: can't find referenced class cz.msebera.android.httpclient.message.basicnamevaluepair   warning:rx.internal.util.unsafe.baselinkedqueueconsumernoderef: can't find referenced class sun.misc.unsafe warning:rx.internal.util.unsafe.baselinkedqueueproducernoderef: can't find referenced class sun.misc.unsafe warning:rx.internal.util.unsafe.concurrentcirculararrayqueue: can't find referenced class sun.misc.unsafe warning:rx.internal.util.unsafe.concurrentsequencedcirculararrayqueue: can't find referenced class sun.misc.unsafe warning:rx.internal.util.unsafe.mpmcarrayqueueconsumerfield: can't find referenced class sun.misc.unsafe warning:rx.internal.util.unsafe.mpmcarrayqueueproducerfield: can't find referenced class sun.misc.unsafe warning:rx.internal.util.unsafe.mpsclinkedqueue: can't find referenced class sun.misc.unsafe warning:rx.internal.util.unsafe.spmcarrayqueueconsumerfield: can't find referenced class sun.misc.unsafe warning:rx.internal.util.unsafe.spmcarrayqueueproducerfield: can't find referenced class sun.misc.unsafe warning:rx.internal.util.unsafe.spscarrayqueue: can't find referenced class sun.misc.unsafe warning:rx.internal.util.unsafe.spscarrayqueueconsumerfield: can't find referenced class sun.misc.unsafe warning:rx.internal.util.unsafe.spscarrayqueueproducerfields: can't find referenced class sun.misc.unsafe warning:rx.internal.util.unsafe.unsafeaccess: can't find referenced class sun.misc.unsafe warning:library class android.webkit.webview depends on program class android.net.http.sslcertificate warning:library class android.webkit.webviewclient depends on program class android.net.http.sslerror warning:library class org.apache.http.conn.ssl.sslsocketfactory depends on program class org.apache.http.conn.scheme.hostnameresolver warning:library class org.apache.http.conn.ssl.sslsocketfactory depends on program class org.apache.http.params.httpparams warning:library class org.apache.http.params.httpconnectionparams depends on program class org.apache.http.params.httpparams warning:there 757 unresolved references classes or interfaces. warning:there 18 instances of library classes depending on program classes. warning:there 8 unresolved references program class members. warning:there 2 unresolved references library class members. 

after adding lines provided in hitesh gehlot answer. receiving these 5 warnings.

information:gradle tasks [:app:assemblerelease] warning:com.algolia.search.saas.apiclient: can't find referenced method 'org.json.jsonobject put(java.lang.string,java.util.collection)' in library class org.json.jsonobject warning:com.algolia.search.saas.index: can't find referenced method 'org.json.jsonobject put(java.lang.string,java.util.collection)' in library class org.json.jsonobject warning:library class android.webkit.webview depends on program class android.net.http.sslcertificate warning:library class android.webkit.webviewclient depends on program class android.net.http.sslerror warning:there 3 instances of library classes depending on program classes. warning:there 2 unresolved references library class members. warning:exception while processing task java.io.ioexception: please correct above warnings first. error:execution failed task ':app:transformclassesandresourceswithproguardforrelease'. > java.io.ioexception: please correct above warnings first. 

paste these lines in proguard-rules.pro file

-dontwarn com.loopj.android.http.** -dontwarn org.apache.http.** -dontwarn rx.internal.util.** 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -