当前位置: 首页 > 知识库问答 >
问题:

ProGuard问题-Classes.jar错误

曾洲
2023-03-14

我看到了所有这些,所以也遵循了给出的几个步骤,但我无法解决这个问题。奇怪的是,我仍然有这个问题:

当我尝试构建我的项目时,出现1个错误和176个警告。

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

这是我的proguard文件:

-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档案:

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"

}

我如何解决这个问题?

共有1个答案

颜畅
2023-03-14

这不是一个进步的问题。相反,这是一个SDK23的问题与不推荐的包组织。阿帕奇。http,您可以通过解决方法解决该问题

Android使用图书馆组织。阿帕奇。http。遗产'

在适当的梯度格式需要在建设。格拉德尔

 类似资料:
  • 在启用proguard时,我会得到以下警告

  • 我正在尝试生成一个启用了minifytrue的库,但是在版本中。啊,上课。罐子快空了。 我已经检查了我的程序规则。而且看起来还不错。 我甚至用默认设置创建了一个新模块。gradle文件,当我将minifyEnable设置为true时,发布版本仍然会获得类。里面没有类的jar。 毕竟,有可能生成一个混淆代码的android库吗? 编辑1:添加模块生成。格拉德尔

  • 我试图用sbt proguard获得更小的标量可执行jar文件。我添加了项目/插件。sbt这两行代码: 第一个是获取uberjar文件,我可以使用来获取uberjar,这很好。 然后,我执行了来获取这个错误消息。 从这篇文章的提示:ProGuard说不支持的类版本号[52.0](最大51.0,Java1.7)与sbt-proGuard,我切换到Java1.7和Java1.6与导出JAVA_HOME

  • 问题内容: 我正在尝试使Maven与ProGuard一起工作。 我要实现以下目标: 在我的源文件上运行ProGuard并生成混淆的类 创建一个引用主类的清单文件,以便我可以将其作为jar执行 解压缩所有关联的库jar,并创建一个包含所有库的巨大jar。该文件只能与.class和.xml文件联系。 将它们组装为.zip和tar.gz文件,其中包括各种README.txt文件等。 到目前为止,我有这样

  • 问题内容: 我在应用程序中使用Gson,为此,我使用了一些名称与使用Json相同的类。我的应用程序运行良好,但是在编写proguard时,应用程序崩溃了,我猜有些类正在缩小。我的错误是: java.lang.ClassCastException:com.google.gson.internal.StringMap无法转换为com.sample.package.GsonClass 问题答案: 您需要

  • 我得到以下错误,当我建立我的Xamarin。Android应用发布。 这是输出。。。 阅读输出消息ProGuard似乎有问题,有人知道我能做什么吗?