Proguard问题-Classes.jar错误 [英] Proguard Issue - Classes.jar error

查看:105
本文介绍了Proguard问题-Classes.jar错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看到所有SO都遵循了给出的几个步骤,但是我无法解决该问题.奇怪的是,我仍然遇到此问题:

I have seen all of SO also followed few steps given but I couldn't fix the issue. Strangely I am still getting this issue:

1个错误和176个警告,当我尝试构建项目时.

1 error and 176 warning when I try to build my project.

Note: there were 251 duplicate class definitions.
      (http://proguard.sourceforge.net/manual/troubleshooting.html#duplicateclass)
Warning:com.loopj.android.http.HttpDelete: can't find superclass or interface org.apache.http.client.methods.HttpEntityEnclosingRequestBase
Warning:com.loopj.android.http.HttpGet: can't find superclass or interface org.apache.http.client.methods.HttpEntityEnclosingRequestBase
Warning:com.loopj.android.http.HttpPatch: can't find superclass or interface org.apache.http.client.methods.HttpEntityEnclosingRequestBase
Warning:com.loopj.android.http.MyRedirectHandler: can't find superclass or interface org.apache.http.impl.client.DefaultRedirectHandler
Warning:com.loopj.android.http.PersistentCookieStore: can't find superclass or interface org.apache.http.client.CookieStore
Warning:com.loopj.android.http.RetryHandler: can't find superclass or interface org.apache.http.client.HttpRequestRetryHandler
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.conn.scheme.SchemeRegistry
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.conn.scheme.Scheme
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.conn.scheme.PlainSocketFactory
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.conn.scheme.Scheme
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.conn.scheme.SchemeRegistry
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.conn.params.ConnManagerParams
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.conn.params.ConnPerRouteBean
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.conn.params.ConnManagerParams
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.impl.client.DefaultHttpClient
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.client.protocol.ClientContext
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.impl.client.DefaultHttpClient
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.client.params.ClientPNames
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.impl.client.DefaultHttpClient
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.conn.params.ConnRoutePNames
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.impl.client.DefaultHttpClient
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.auth.AuthScope
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.auth.UsernamePasswordCredentials
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.client.CredentialsProvider
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.impl.client.DefaultHttpClient
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.conn.ClientConnectionManager
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.auth.AuthScope
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.impl.client.DefaultHttpClient
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.client.CredentialsProvider
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.client.methods.HttpHead
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.client.methods.HttpUriRequest
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.client.methods.HttpPost
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.client.methods.HttpEntityEnclosingRequestBase
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.client.methods.HttpPut
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced method 'void setHeaders(org.apache.http.Header[])' in program class com.loopj.android.http.HttpDelete
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.client.methods.HttpEntityEnclosingRequestBase
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.client.methods.HttpUriRequest
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.conn.scheme.SchemeRegistry
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.conn.ClientConnectionManager
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.client.CredentialsProvider
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.auth.AuthScope
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.auth.Credentials
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.client.methods.HttpUriRequest
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.client.methods.HttpEntityEnclosingRequestBase
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.impl.client.DefaultHttpClient
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.conn.scheme.PlainSocketFactory
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.conn.params.ConnManagerParams
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.client.CredentialsProvider
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.conn.ClientConnectionManager
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.client.methods.HttpUriRequest
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.impl.client.DefaultHttpClient
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.conn.scheme.SchemeRegistry
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.conn.ClientConnectionManager
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.client.HttpClient
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.client.CookieStore
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.conn.scheme.SchemeRegistry
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.conn.ClientConnectionManager
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.conn.scheme.SchemeRegistry
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.client.RedirectHandler
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.auth.AuthScope
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.auth.UsernamePasswordCredentials
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.auth.AuthScope
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.auth.Credentials
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.auth.AuthScope
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.auth.Credentials
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.client.methods.HttpUriRequest
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.client.methods.HttpEntityEnclosingRequestBase
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.impl.client.DefaultHttpClient
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.client.methods.HttpUriRequest
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.impl.client.DefaultHttpClient
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.client.methods.HttpUriRequest
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.impl.client.DefaultHttpClient
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.client.methods.HttpUriRequest
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.impl.client.DefaultHttpClient
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.client.methods.HttpUriRequest
Warning:com.loopj.android.http.AsyncHttpClient: can't find referenced class org.apache.http.client.methods.HttpEntityEnclosingRequestBase
Warning:com.loopj.android.http.AsyncHttpClient$3: can't find referenced class org.apache.http.client.protocol.ClientContext
Warning:com.loopj.android.http.AsyncHttpClient$3: can't find referenced class org.apache.http.auth.AuthState
Warning:com.loopj.android.http.AsyncHttpClient$3: can't find referenced class org.apache.http.client.CredentialsProvider
Warning:com.loopj.android.http.AsyncHttpClient$3: can't find referenced class org.apache.http.auth.AuthState
Warning:com.loopj.android.http.AsyncHttpClient$3: can't find referenced class org.apache.http.auth.AuthScope
Warning:com.loopj.android.http.AsyncHttpClient$3: can't find referenced class org.apache.http.client.CredentialsProvider
Warning:com.loopj.android.http.AsyncHttpClient$3: can't find referenced class org.apache.http.impl.auth.BasicScheme
Warning:com.loopj.android.http.AsyncHttpClient$3: can't find referenced class org.apache.http.auth.AuthState
Warning:com.loopj.android.http.AsyncHttpClient$3: can't find referenced class org.apache.http.client.CredentialsProvider
Warning:com.loopj.android.http.AsyncHttpClient$3: can't find referenced class org.apache.http.auth.AuthScope
Warning:com.loopj.android.http.AsyncHttpClient$3: can't find referenced class org.apache.http.auth.Credentials
Warning:com.loopj.android.http.AsyncHttpClient$3: can't find referenced class org.apache.http.auth.AuthState
Warning:com.loopj.android.http.AsyncHttpClient$3: can't find referenced class org.apache.http.client.CredentialsProvider
Warning:com.loopj.android.http.AsyncHttpRequest: can't find referenced class org.apache.http.impl.client.AbstractHttpClient
Warning:com.loopj.android.http.AsyncHttpRequest: can't find referenced class org.apache.http.client.methods.HttpUriRequest
Warning:com.loopj.android.http.AsyncHttpRequest: can't find referenced class org.apache.http.impl.client.AbstractHttpClient
Warning:com.loopj.android.http.AsyncHttpRequest: can't find referenced class org.apache.http.client.HttpRequestRetryHandler
Warning:com.loopj.android.http.AsyncHttpRequest: can't find referenced class org.apache.http.client.methods.HttpUriRequest
Warning:com.loopj.android.http.AsyncHttpRequest: can't find referenced class org.apache.http.client.HttpRequestRetryHandler
Warning:com.loopj.android.http.AsyncHttpRequest: can't find referenced class org.apache.http.impl.client.AbstractHttpClient
Warning:com.loopj.android.http.AsyncHttpRequest: can't find referenced class org.apache.http.client.methods.HttpUriRequest
Warning:com.loopj.android.http.AsyncHttpRequest: can't find referenced class org.apache.http.impl.client.AbstractHttpClient
Warning:com.loopj.android.http.AsyncHttpRequest: can't find referenced class org.apache.http.client.methods.HttpUriRequest
Warning:com.loopj.android.http.AsyncHttpRequest: can't find referenced class org.apache.http.impl.client.AbstractHttpClient
Warning:com.loopj.android.http.AsyncHttpRequest: can't find referenced class org.apache.http.client.methods.HttpUriRequest
Warning:com.loopj.android.http.AsyncHttpRequest: can't find referenced class org.apache.http.client.HttpRequestRetryHandler
Warning:com.loopj.android.http.AsyncHttpResponseHandler: can't find referenced class org.apache.http.client.HttpResponseException
Warning:com.loopj.android.http.BinaryHttpResponseHandler: can't find referenced class org.apache.http.client.HttpResponseException
Warning:com.loopj.android.http.HttpDelete: can't find referenced class org.apache.http.client.methods.HttpEntityEnclosingRequestBase
Warning:com.loopj.android.http.HttpDelete: can't find referenced method 'void setURI(java.net.URI)' in program class com.loopj.android.http.HttpDelete
Warning:com.loopj.android.http.HttpDelete: can't find referenced class org.apache.http.client.methods.HttpEntityEnclosingRequestBase
Warning:com.loopj.android.http.HttpGet: can't find referenced class org.apache.http.client.methods.HttpEntityEnclosingRequestBase
Warning:com.loopj.android.http.HttpGet: can't find referenced method 'void setURI(java.net.URI)' in program class com.loopj.android.http.HttpGet
Warning:com.loopj.android.http.HttpGet: can't find referenced class org.apache.http.client.methods.HttpEntityEnclosingRequestBase
Warning:com.loopj.android.http.HttpPatch: can't find referenced class org.apache.http.client.methods.HttpEntityEnclosingRequestBase
Warning:com.loopj.android.http.HttpPatch: can't find referenced method 'void setURI(java.net.URI)' in program class com.loopj.android.http.HttpPatch
Warning:com.loopj.android.http.HttpPatch: can't find referenced class org.apache.http.client.methods.HttpEntityEnclosingRequestBase
Warning:com.loopj.android.http.MyRedirectHandler: can't find referenced class org.apache.http.impl.client.DefaultRedirectHandler
Warning:com.loopj.android.http.MyRedirectHandler: can't find referenced class org.apache.http.client.params.ClientPNames
Warning:com.loopj.android.http.MyRedirectHandler: can't find referenced class org.apache.http.client.utils.URIUtils
Warning:com.loopj.android.http.MyRedirectHandler: can't find referenced class org.apache.http.impl.client.RedirectLocations
Warning:com.loopj.android.http.MyRedirectHandler: can't find referenced class org.apache.http.client.CircularRedirectException
Warning:com.loopj.android.http.MyRedirectHandler: can't find referenced class org.apache.http.impl.client.RedirectLocations
Warning:com.loopj.android.http.MyRedirectHandler: can't find referenced class org.apache.http.impl.client.DefaultRedirectHandler
Warning:com.loopj.android.http.MyRedirectHandler: can't find referenced class org.apache.http.impl.client.RedirectLocations
Warning:com.loopj.android.http.MyRedirectHandler: can't find referenced class org.apache.http.client.utils.URIUtils
Warning:com.loopj.android.http.MyRedirectHandler: can't find referenced class org.apache.http.impl.client.RedirectLocations
Warning:com.loopj.android.http.MySSLSocketFactory: can't find referenced class org.apache.http.conn.scheme.SchemeRegistry
Warning:com.loopj.android.http.MySSLSocketFactory: can't find referenced class org.apache.http.conn.scheme.Scheme
Warning:com.loopj.android.http.MySSLSocketFactory: can't find referenced class org.apache.http.conn.scheme.PlainSocketFactory
Warning:com.loopj.android.http.MySSLSocketFactory: can't find referenced class org.apache.http.conn.scheme.Scheme
Warning:com.loopj.android.http.MySSLSocketFactory: can't find referenced class org.apache.http.conn.scheme.SchemeRegistry
Warning:com.loopj.android.http.MySSLSocketFactory: can't find referenced class org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager
Warning:com.loopj.android.http.MySSLSocketFactory: can't find referenced class org.apache.http.impl.client.DefaultHttpClient
Warning:com.loopj.android.http.MySSLSocketFactory: can't find referenced class org.apache.http.conn.scheme.PlainSocketFactory
Warning:com.loopj.android.http.MySSLSocketFactory: can't find referenced class org.apache.http.impl.client.DefaultHttpClient
Warning:com.loopj.android.http.MySSLSocketFactory: can't find referenced class org.apache.http.conn.scheme.SchemeRegistry
Warning:com.loopj.android.http.MySSLSocketFactory: can't find referenced class org.apache.http.conn.ClientConnectionManager
Warning:com.loopj.android.http.PersistentCookieStore: can't find referenced class org.apache.http.cookie.Cookie
Warning:com.loopj.android.http.PersistentCookieStore: can't find referenced class org.apache.http.client.CookieStore
Warning:com.loopj.android.http.PersistentCookieStore: can't find referenced class org.apache.http.cookie.Cookie
Warning:com.loopj.android.http.PreemptiveAuthorizationHttpRequestInterceptor: can't find referenced class org.apache.http.client.protocol.ClientContext
Warning:com.loopj.android.http.PreemptiveAuthorizationHttpRequestInterceptor: can't find referenced class org.apache.http.auth.AuthState
Warning:com.loopj.android.http.PreemptiveAuthorizationHttpRequestInterceptor: can't find referenced class org.apache.http.client.CredentialsProvider
Warning:com.loopj.android.http.PreemptiveAuthorizationHttpRequestInterceptor: can't find referenced class org.apache.http.auth.AuthState
Warning:com.loopj.android.http.PreemptiveAuthorizationHttpRequestInterceptor: can't find referenced class org.apache.http.auth.AuthScope
Warning:com.loopj.android.http.PreemptiveAuthorizationHttpRequestInterceptor: can't find referenced class org.apache.http.client.CredentialsProvider
Warning:com.loopj.android.http.PreemptiveAuthorizationHttpRequestInterceptor: can't find referenced class org.apache.http.impl.auth.BasicScheme
Warning:com.loopj.android.http.PreemptiveAuthorizationHttpRequestInterceptor: can't find referenced class org.apache.http.auth.AuthState
Warning:com.loopj.android.http.PreemptiveAuthorizationHttpRequestInterceptor: can't find referenced class org.apache.http.client.CredentialsProvider
Warning:com.loopj.android.http.PreemptiveAuthorizationHttpRequestInterceptor: can't find referenced class org.apache.http.auth.AuthScope
Warning:com.loopj.android.http.PreemptiveAuthorizationHttpRequestInterceptor: can't find referenced class org.apache.http.auth.Credentials
Warning:com.loopj.android.http.PreemptiveAuthorizationHttpRequestInterceptor: can't find referenced class org.apache.http.auth.AuthState
Warning:com.loopj.android.http.PreemptiveAuthorizationHttpRequestInterceptor: can't find referenced class org.apache.http.client.CredentialsProvider
Warning:com.loopj.android.http.RangeFileAsyncHttpResponseHandler: can't find referenced class org.apache.http.client.HttpResponseException
Warning:com.loopj.android.http.RangeFileAsyncHttpResponseHandler: can't find referenced class org.apache.http.client.methods.HttpUriRequest
Warning:com.loopj.android.http.RequestParams: can't find referenced class org.apache.http.client.entity.UrlEncodedFormEntity
Warning:com.loopj.android.http.RequestParams: can't find referenced class org.apache.http.client.utils.URLEncodedUtils
Warning:com.loopj.android.http.RetryHandler: can't find referenced class org.apache.http.client.methods.HttpUriRequest
Warning:com.loopj.android.http.RetryHandler: can't find referenced class org.apache.http.client.HttpRequestRetryHandler
Warning:com.loopj.android.http.RetryHandler: can't find referenced class org.apache.http.client.methods.HttpUriRequest
Warning:com.loopj.android.http.SerializableCookie: can't find referenced class org.apache.http.cookie.Cookie
Warning:com.loopj.android.http.SerializableCookie: can't find referenced class org.apache.http.impl.cookie.BasicClientCookie
Warning:com.loopj.android.http.SerializableCookie: can't find referenced class org.apache.http.cookie.Cookie
Warning:com.loopj.android.http.SerializableCookie: can't find referenced class org.apache.http.impl.cookie.BasicClientCookie
Warning:com.loopj.android.http.SerializableCookie: can't find referenced class org.apache.http.cookie.Cookie
Warning:com.loopj.android.http.SyncHttpClient: can't find referenced class org.apache.http.client.methods.HttpUriRequest
Warning:com.loopj.android.http.SyncHttpClient: can't find referenced class org.apache.http.conn.scheme.SchemeRegistry
Warning:com.loopj.android.http.SyncHttpClient: can't find referenced class org.apache.http.impl.client.DefaultHttpClient
Warning:com.loopj.android.http.SyncHttpClient: can't find referenced class org.apache.http.client.methods.HttpUriRequest
Warning:com.loopj.android.http.SyncHttpClient: can't find referenced class org.apache.http.impl.client.DefaultHttpClient
Warning:com.loopj.android.http.SyncHttpClient: can't find referenced class org.apache.http.client.methods.HttpUriRequest
Warning:com.viewpagerindicator.LinePageIndicator: can't find referenced method 'float ceil(float)' in library class android.util.FloatMath
Warning:library class org.apache.http.conn.scheme.SocketFactory depends on program class org.apache.http.params.HttpParams
Warning:library class org.apache.http.conn.ssl.SSLSocketFactory depends on program class org.apache.http.params.HttpParams
Warning:there were 261 unresolved references to classes or interfaces.
         You may need to add missing library jars or update their versions.
         If your code works fine without the missing classes, you can suppress
         the warnings with '-dontwarn' options.
         (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass)
Warning:there were 2 instances of library classes depending on program classes.
         You must avoid such dependencies, since the program classes will
         be processed, while the library classes will remain unchanged.
         (http://proguard.sourceforge.net/manual/troubleshooting.html#dependency)
Warning:there were 4 unresolved references to program class members.
         Your input classes appear to be inconsistent.
         You may need to recompile the code.
         (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedprogramclassmember)
Warning:there were 1 unresolved references to library class members.
         You probably need to update the library versions.
         (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedlibraryclassmember)
Exception while processing task 
java.io.IOException: Please correct the above warnings first.
    at proguard.Initializer.execute(Initializer.java:473)
    at proguard.ProGuard.initialize(ProGuard.java:233)
    at proguard.ProGuard.execute(ProGuard.java:98)
    at proguard.gradle.ProGuardTask.proguard(ProGuardTask.java:1074)
    at com.android.build.gradle.tasks.AndroidProGuardTask.doMinification(AndroidProGuardTask.java:139)
    at com.android.build.gradle.tasks.AndroidProGuardTask$1.run(AndroidProGuardTask.java:115)
    at com.android.builder.tasks.Job.runTask(Job.java:48)
    at com.android.build.gradle.tasks.SimpleWorkQueue$EmptyThreadContext.runTask(SimpleWorkQueue.java:41)
    at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:227)
    at java.lang.Thread.run(Thread.java:745)
:app:dexRelease UP-TO-DATE
:app:validateExternalOverrideSigning
:app:packageRelease FAILED
Error:Execution failed for task ':app:packageRelease'.
> Unable to compute hash of D:\Development\Android\AndroidStudioProject\MyProject\app\build\intermediates\classes-proguard\release\classes.jar

这是我的保护文件:

-optimizationpasses 25
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-dontwarn com.squareup.okhttp.**
-verbose
-printmapping out.map
-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable
-keep class com.splunk.** { *; }
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class com.android.vending.licensing.ILicensingService
-keepclasseswithmembernames class * {
    native <methods>;
}
-keepclasseswithmembers class * {
    public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembers class * {
    public <init>(android.content.Context, android.util.AttributeSet, int);
}
-keepclassmembers class * extends android.app.Activity {
   public void *(android.view.View);
}
-keepclassmembers enum * {
    public static **[] values();
    public static ** valueOf(java.lang.String);
}
-keep class * implements android.os.Parcelable {
  public static final android.os.Parcelable$Creator *;
}

-keepattributes Signature
-keepattributes *Annotation*
-keep class com.squareup.okhttp.** { *; }
-keep interface com.squareup.okhttp.** { *; }
-dontwarn com.squareup.okhttp.**

-dontwarn rx.**
-dontwarn retrofit.**
-keep class retrofit.** { *; }
-keepclasseswithmembers class * {
    @retrofit.http.* <methods>;
}

-keep class sun.misc.Unsafe { *; }  

-dontwarn java.nio.file.Files
-dontwarn java.nio.file.Path
-dontwarn java.nio.file.OpenOption
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement

 -keep class com.google.android.gms.** { *; }
 -dontwarn com.google.android.gms.**

 -keep class com.loopj.android.** { *; }
 -keep interface com.loopj.android.** { *; }
 -keep class cz.msebera.android.httpclient.HttpResponse { *; }
 -keep class com.loopj.android.http.HttpGet { *; }
 -keep class com.loopj.android.http.HttpDelete { *; }

 -dontwarn android.support.v7.**
 -keep class android.support.v7.** { *; }
 -keep interface android.support.v7.** { *; }

我的build.gradle文件:

My build.gradle file:

apply plugin: 'com.android.application'
apply plugin: 'android'

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"

defaultConfig {
applicationId "com.nsw.sampletestAPP"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
maven {
url "https://mint.splunk.com/gradle/"
}
}

dependencies {
// compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.rengwuxian.materialedittext:library:2.1.4'
compile 'com.squareup.picasso:picasso:2.5.2'
compile files('libs/pixlui-1-0-5.jar')
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.4'
compile 'org.apache.httpcomponents:httpcore:4.4.1'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.loopj.android:android-async-http:1.4.8'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile project(':librarygridview')
compile project(':pageIndicator')
compile "com.splunk.mint:mint:4.4.0"

}

我该如何解决这个问题?

How do I solve this issue?

推荐答案

不是proguard问题.相反,它是带有已弃用软件包 org.apache.http 的sdk 23问题,您可以使用

not a proguard issue. Rather its an sdk 23 issue with deprecated package org.apache.http which you can resolve with the workaround

android.useLibrary'org.apache.http.legacy'

android.useLibrary 'org.apache.http.legacy'

正确的gradle格式必须位于build.gradle

in proper gradle format needs to be in build.gradle

这篇关于Proguard问题-Classes.jar错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆