0

私はthisを読んでいます。かなりの間、既知の問題のようです。しかし、私がpro-guardを使用していないとき、私は何の警告もクラッシュも受けていませんでした。それを有効にした後、私は約500の警告を受けています。Proguardを有効にした後にcom.loopj.android.http.AsyncHttpClientを取得する

警告:com.loopj.android.http.AsyncHttpClient:私は、次の試してみました参照 クラスcz.msebera.android.httpclient

を見つけることができませんが、それでもすべての警告のありますそこ。

android { 

    compileSdkVersion 24 
    buildToolsVersion "24.0.3" 
    useLibrary 'org.apache.http.legacy' 

} 

http-clientライブラリを使用していませんが、自分のプロジェクトで使用している他のライブラリがこれを使用している可能性があります。 Hitesh Gehlot回答に設けられた行を追加した後

警告

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 were 757 unresolved references to classes or interfaces. 
Warning:there were 18 instances of library classes depending on program classes. 
Warning:there were 8 unresolved references to program class members. 
Warning:there were 2 unresolved references to library class members. 

。私はこれらの5つの警告を受けています。

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 were 3 instances of library classes depending on program classes. 
Warning:there were 2 unresolved references to library class members. 
Warning:Exception while processing task java.io.IOException: Please correct the above warnings first. 
Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'. 
> java.io.IOException: Please correct the above warnings first. 

答えて

7

がproguard-rules.proファイル

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

おかげ@Hiteshに次の行を貼り付け、これらの同類は、これらは私が今取得しています5警告している500以上のちょうど5 から警告を取ります。 – Kirmani88

+0

質問を更新しました – Kirmani88

+3

-dontwarn com.algolia.search ** –