我已经看到所有SO都遵循了一些步骤,但是我无法解决该问题.奇怪的是我仍然遇到这个问题:
尝试构建项目时出现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"
}
我该如何解决这个问题?
解决方法:
不是保护问题.而不是sdk 23问题,已弃用的软件包org.apache.http可以用the workaround解决
android.useLibrary’org.apache.http.legacy’
以正确的gradle格式需要在build.gradle中
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。