我已经看到所有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"
}
如何解决此问题?
答案 0 :(得分:0)
不是一个问题。而是使用已弃用的软件包 org.apache.http 的sdk 23问题,您可以使用the workaround来解决
android.useLibrary&#39; org.apache.http.legacy&#39;
正确的gradle格式的需要在build.gradle中