我无法生成签名的apk。该应用程序调试并运行良好,但未生成签名的apk。如果我执行minifyEnabled false,则会生成签名的apk。
buildTypes {
debug { debuggable false }
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
mavenCentral()
}
android {
useLibrary 'org.apache.http.legacy'
}
dependencies {
// compile 'com.android.support:multidex:1.0.0'
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:25.0.1'
compile 'com.android.support:design:25.0.1'
compile 'com.android.support:support-v4:25.0.1'
compile 'com.android.support:cardview-v7:25.0.1'
// RecyclerView
compile 'com.android.support:recyclerview-v7:25.0.1'
compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:2.0.1'
compile 'com.facebook.android:facebook-android-sdk:4.0.0'
compile 'org.apache.httpcomponents:httpcore:4.2.1'
compile 'org.apache.httpcomponents:httpclient:4.5.2'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.google.firebase:firebase-database:10.2.0'
compile 'com.google.firebase:firebase-auth:10.2.0'
compile 'com.google.firebase:firebase-core:10.2.0'
compile 'com.firebase:firebase-client-android:2.5.2+'
compile 'com.google.android.gms:play-services:10.2.0'
compile 'com.google.android.gms:play-services-location:10.2.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.squareup.picasso:picasso:2.5.0'
compile 'com.firebase:geofire-android:2.1.1'
compile 'com.google.firebase:firebase-messaging:10.2.0'
compile 'com.squareup.okhttp3:okhttp:3.0.1'
// event bus
compile 'org.greenrobot:eventbus:3.0.0'
compile 'com.zsoltsafrany:needle:1.0.0'
testCompile 'junit:junit:4.12'
compile 'joda-time:joda-time:2.9.7'
}
apply plugin: 'com.google.gms.google-services'
警告:
警告:依赖于128个库类实例 程序类。因为程序,你必须避免这种依赖 将处理类,而库类将保留 不变。 (http://proguard.sourceforge.net/manual/troubleshooting.html#dependency)
警告:处理任务java.io.IOException时出现异常:请 首先纠正上述警告。 :app:transformClassesAndResourcesWithProguardForRelease FAILED错误:任务执行失败 ':应用程序:transformClassesAndResourcesWithProguardForRelease&#39 ;. > java.io.IOException:请先纠正上述警告。
Warning:library class android.net.http.AndroidHttpClientConnection extends or implements program class org.apache.http.HttpInetConnection
Warning:library class android.net.http.AndroidHttpClientConnection extends or implements program class org.apache.http.HttpConnection
Warning:library class com.android.internal.http.multipart.MultipartEntity extends or implements program class org.apache.http.entity.AbstractHttpEntity
Warning:library class org.apache.http.auth.AuthenticationException extends or implements program class org.apache.http.ProtocolException
Warning:library class org.apache.http.auth.MalformedChallengeException extends or implements program class org.apache.http.ProtocolException
Warning:library class org.apache.http.auth.params.AuthParamBean extends or implements program class org.apache.http.params.HttpAbstractParamBean
Warning:library class org.apache.http.client.NonRepeatableRequestException extends or implements program class org.apache.http.ProtocolException
Warning:library class org.apache.http.client.RedirectException extends or implements program class org.apache.http.ProtocolException
Warning:library class org.apache.http.client.entity.UrlEncodedFormEntity extends or implements program class org.apache.http.entity.StringEntity
Warning:library class org.apache.http.client.methods.HttpEntityEnclosingRequestBase extends or implements program class org.apache.http.HttpEntityEnclosingRequest
Warning:library class org.apache.http.client.methods.HttpRequestBase extends or implements program class org.apache.http.message.AbstractHttpMessage
Warning:library class org.apache.http.client.methods.HttpUriRequest extends or implements program class org.apache.http.HttpRequest
Warning:library class org.apache.http.client.params.AllClientPNames extends or implements program class org.apache.http.params.CoreConnectionPNames
Warning:library class org.apache.http.client.params.AllClientPNames extends or implements program class org.apache.http.params.CoreProtocolPNames
Warning:library class org.apache.http.client.params.ClientParamBean extends or implements program class org.apache.http.params.HttpAbstractParamBean
Warning:library class org.apache.http.client.protocol.RequestAddCookies extends or implements program class org.apache.http.HttpRequestInterceptor
Warning:library class org.apache.http.client.protocol.RequestDefaultHeaders extends or implements program class org.apache.http.HttpRequestInterceptor
Warning:library class org.apache.http.client.protocol.RequestProxyAuthentication extends or implements program class org.apache.http.HttpRequestInterceptor
Warning:library class org.apache.http.client.protocol.RequestTargetAuthentication extends or implements program class org.apache.http.HttpRequestInterceptor
Warning:library class org.apache.http.client.protocol.ResponseProcessCookies extends or implements program class org.apache.http.HttpResponseInterceptor
Warning:library class org.apache.http.conn.BasicManagedEntity extends or implements program class org.apache.http.entity.HttpEntityWrapper
Warning:library class org.apache.http.conn.ManagedClientConnection extends or implements program class org.apache.http.HttpClientConnection
Warning:library class org.apache.http.conn.ManagedClientConnection extends or implements program class org.apache.http.HttpInetConnection
Warning:library class org.apache.http.conn.OperatedClientConnection extends or implements program class org.apache.http.HttpClientConnection
Warning:library class org.apache.http.conn.OperatedClientConnection extends or implements program class org.apache.http.HttpInetConnection
Warning:library class org.apache.http.conn.params.ConnConnectionParamBean extends or implements program class org.apache.http.params.HttpAbstractParamBean
Warning:library class org.apache.http.conn.params.ConnManagerParamBean extends or implements program class org.apache.http.params.HttpAbstractParamBean
Warning:library class org.apache.http.conn.params.ConnRouteParamBean extends or implements program class org.apache.http.params.HttpAbstractParamBean
Warning:library class org.apache.http.cookie.MalformedCookieException extends or implements program class org.apache.http.ProtocolException
Warning:library class org.apache.http.cookie.params.CookieSpecParamBean extends or implements program class org.apache.http.params.HttpAbstractParamBean
Warning:library class org.apache.http.impl.client.ClientParamsStack extends or implements program class org.apache.http.params.AbstractHttpParams
Warning:library class org.apache.http.impl.client.EntityEnclosingRequestWrapper extends or implements program class org.apache.http.HttpEntityEnclosingRequest
Warning:library class org.apache.http.impl.client.RequestWrapper extends or implements program class org.apache.http.message.AbstractHttpMessage
Warning:library class org.apache.http.impl.client.TunnelRefusedException extends or implements program class org.apache.http.HttpException
Warning:library class org.apache.http.impl.conn.DefaultClientConnection extends or implements program class org.apache.http.impl.SocketHttpClientConnection
Warning:library class org.apache.http.impl.conn.DefaultResponseParser extends or implements program class org.apache.http.impl.io.AbstractMessageParser
Warning:library class org.apache.http.impl.conn.LoggingSessionInputBuffer extends or implements program class org.apache.http.io.SessionInputBuffer
Warning:library class org.apache.http.impl.conn.LoggingSessionOutputBuffer extends or implements program class org.apache.http.io.SessionOutputBuffer
Warning:com.fasterxml.jackson.databind.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Cache
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.CacheControl
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.CacheControl$Builder
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Request$Builder
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Call
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Response
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.ResponseBody
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Response
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.ResponseBody
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Cache
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.CacheControl
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.CacheControl$Builder
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Request$Builder
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Response
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Cache
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.CacheControl
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Request
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Call
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Response
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.ResponseBody
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.CacheControl$Builder
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.CacheControl
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Request$Builder
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Response
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.ResponseBody
Warning:com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Cache
Warning:okio.DeflaterSink: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
Warning:okio.Okio: can't find referenced class java.nio.file.Files
Warning:okio.Okio: can't find referenced class java.nio.file.Path
Warning:okio.Okio: can't find referenced class java.nio.file.OpenOption
Warning:okio.Okio: can't find referenced class java.nio.file.Path
Warning:okio.Okio: can't find referenced class java.nio.file.OpenOption
Warning:okio.Okio: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
Warning:okio.Okio: can't find referenced class java.nio.file.Path
Warning:okio.Okio: can't find referenced class java.nio.file.OpenOption
Warning:okio.Okio: can't find referenced class java.nio.file.Path
Warning:okio.Okio: can't find referenced class java.nio.file.OpenOption
Warning:okio.Okio: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
Warning:org.joda.time.DateMidnight: can't find referenced class org.joda.convert.FromString
Warning:org.joda.time.DateTime: can't find referenced class org.joda.convert.FromString
Warning:org.joda.time.DateTimeZone: can't find referenced class org.joda.convert.FromString
Warning:org.joda.time.DateTimeZone: can't find referenced class org.joda.convert.ToString
Warning:org.joda.time.Days: can't find referenced class org.joda.convert.FromString
Warning:org.joda.time.Days: can't find referenced class org.joda.convert.ToString
Warning:org.joda.time.Duration: can't find referenced class org.joda.convert.FromString
Warning:org.joda.time.Hours: can't find referenced class org.joda.convert.FromString
Warning:org.joda.time.Hours: can't find referenced class org.joda.convert.ToString
Warning:org.joda.time.Instant: can't find referenced class org.joda.convert.FromString
Warning:org.joda.time.LocalDate: can't find referenced class org.joda.convert.FromString
Warning:org.joda.time.LocalDate: can't find referenced class org.joda.convert.ToString
Warning:org.joda.time.LocalDateTime: can't find referenced class org.joda.convert.FromString
Warning:org.joda.time.LocalDateTime: can't find referenced class org.joda.convert.ToString
Warning:org.joda.time.LocalTime: can't find referenced class org.joda.convert.FromString
Warning:org.joda.time.LocalTime: can't find referenced class org.joda.convert.ToString
Warning:org.joda.time.Minutes: can't find referenced class org.joda.convert.FromString
Warning:org.joda.time.Minutes: can't find referenced class org.joda.convert.ToString
Warning:org.joda.time.MonthDay: can't find referenced class org.joda.convert.FromString
Warning:org.joda.time.MonthDay: can't find referenced class org.joda.convert.ToString
Warning:org.joda.time.Months: can't find referenced class org.joda.convert.FromString
Warning:org.joda.time.Months: can't find referenced class org.joda.convert.ToString
Warning:org.joda.time.MutableDateTime: can't find referenced class org.joda.convert.FromString
Warning:org.joda.time.MutablePeriod: can't find referenced class org.joda.convert.FromString
Warning:org.joda.time.Period: can't find referenced class org.joda.convert.FromString
Warning:org.joda.time.Seconds: can't find referenced class org.joda.convert.FromString
Warning:org.joda.time.Seconds: can't find referenced class org.joda.convert.ToString
Warning:org.joda.time.Weeks: can't find referenced class org.joda.convert.FromString
Warning:org.joda.time.Weeks: can't find referenced class org.joda.convert.ToString
Warning:org.joda.time.YearMonth: can't find referenced class org.joda.convert.FromString
Warning:org.joda.time.YearMonth: can't find referenced class org.joda.convert.ToString
Warning:org.joda.time.Years: can't find referenced class org.joda.convert.FromString
Warning:org.joda.time.Years: can't find referenced class org.joda.convert.ToString
Warning:org.joda.time.base.AbstractDateTime: can't find referenced class org.joda.convert.ToString
Warning:org.joda.time.base.AbstractDuration: can't find referenced class org.joda.convert.ToString
Warning:org.joda.time.base.AbstractInstant: can't find referenced class org.joda.convert.ToString
Warning:org.joda.time.base.AbstractPeriod: can't find referenced class org.joda.convert.ToString
Warning:library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpRequest
Warning:library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpEntity
Warning:library class android.net.http.AndroidHttpClient depends on program class org.apache.http.params.HttpParams
Warning:library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpResponse
Warning:library class android.net.http.AndroidHttpClient depends on program class org.apache.http.protocol.HttpContext
Warning:library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpResponse
Warning:library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpHost
Warning:library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpRequest
Warning:library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpResponse
Warning:library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpHost
Warning:library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpRequest
Warning:library class android.net.http.AndroidHttpClient depends on program class org.apache.http.protocol.HttpContext
Warning:library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpResponse
Warning:library class android.net.http.AndroidHttpClient depends on program class org.apache.http.protocol.HttpContext
Warning:library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpHost
Warning:library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpRequest
Warning:library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpHost
Warning:library class android.net.http.AndroidHttpClient depends on program class org.apache.http.HttpRequest
Warning:library class android.net.http.AndroidHttpClient depends on program class org.apache.http.protocol.HttpContext
Warning:library class android.net.http.AndroidHttpClient depends on program class org.apache.http.entity.AbstractHttpEntity
Warning:library class org.apache.http.client.HttpClient depends on program class org.apache.http.params.HttpParams
Warning:library class org.apache.http.client.HttpClient depends on program class org.apache.http.HttpResponse
Warning:library class org.apache.http.client.HttpClient depends on program class org.apache.http.protocol.HttpContext
Warning:library class org.apache.http.client.HttpClient depends on program class org.apache.http.HttpResponse
Warning:library class org.apache.http.client.HttpClient depends on program class org.apache.http.HttpHost
Warning:library class org.apache.http.client.HttpClient depends on program class org.apache.http.HttpRequest
Warning:library class org.apache.http.client.HttpClient depends on program class org.apache.http.HttpResponse
Warning:library class org.apache.http.client.HttpClient depends on program class org.apache.http.HttpHost
Warning:library class org.apache.http.client.HttpClient depends on program class org.apache.http.HttpRequest
Warning:library class org.apache.http.client.HttpClient depends on program class org.apache.http.protocol.HttpContext
Warning:library class org.apache.http.client.HttpClient depends on program class org.apache.http.HttpResponse
Warning:library class org.apache.http.client.HttpClient depends on program class org.apache.http.protocol.HttpContext
Warning:library class org.apache.http.client.HttpClient depends on program class org.apache.http.HttpHost
Warning:library class org.apache.http.client.HttpClient depends on program class org.apache.http.HttpRequest
Warning:library class org.apache.http.client.HttpClient depends on program class org.apache.http.HttpHost
Warning:library class org.apache.http.client.HttpClient depends on program class org.apache.http.HttpRequest
Warning:library class org.apache.http.client.HttpClient depends on program class org.apache.http.protocol.HttpContext
Warning:library class org.apache.http.client.ResponseHandler depends on program class org.apache.http.HttpResponse
Warning:library class org.apache.http.client.methods.HttpEntityEnclosingRequestBase depends on program class org.apache.http.HttpEntity
Warning:library class org.apache.http.client.methods.HttpOptions depends on program class org.apache.http.HttpResponse
Warning:library class org.apache.http.client.methods.HttpRequestBase depends on program class org.apache.http.ProtocolVersion
Warning:library class org.apache.http.client.methods.HttpRequestBase depends on program class org.apache.http.RequestLine
Warning:library class org.apache.http.impl.client.AbstractHttpClient depends on program class org.apache.http.params.HttpParams
Warning:library class org.apache.http.impl.client.AbstractHttpClient depends on program class org.apache.http.protocol.HttpContext
Warning:library class org.apache.http.impl.client.AbstractHttpClient depends on program class org.apache.http.protocol.HttpRequestExecutor
Warning:library class org.apache.http.impl.client.AbstractHttpClient depends on program class org.apache.http.ConnectionReuseStrategy
Warning:library class org.apache.http.impl.client.AbstractHttpClient depends on program class org.apache.http.protocol.BasicHttpProcessor
Warning:library class org.apache.http.impl.client.AbstractHttpClient depends on program class org.apache.http.params.HttpParams
Warning:library class org.apache.http.impl.client.AbstractHttpClient depends on program class org.apache.http.protocol.HttpRequestExecutor
Warning:library class org.apache.http.impl.client.AbstractHttpClient depends on program class org.apache.http.ConnectionReuseStrategy
Warning:library class org.apache.http.impl.client.AbstractHttpClient depends on program class org.apache.http.protocol.BasicHttpProcessor
Warning:library class org.apache.http.impl.client.AbstractHttpClient depends on program class org.apache.http.HttpResponseInterceptor
Warning:library class org.apache.http.impl.client.AbstractHttpClient depends on program class org.apache.http.HttpRequestInterceptor
Warning:library class org.apache.http.impl.client.AbstractHttpClient depends on program class org.apache.http.HttpResponse
Warning:library class org.apache.http.impl.client.AbstractHttpClient depends on program class org.apache.http.protocol.HttpContext
Warning:library class org.apache.http.impl.client.AbstractHttpClient depends on program class org.apache.http.HttpResponse
Warning:library class org.apache.http.impl.client.AbstractHttpClient depends on program class org.apache.http.HttpHost
Warning:library class org.apache.http.impl.client.AbstractHttpClient depends on program class org.apache.http.HttpRequest
Warning:library class org.apache.http.impl.client.AbstractHttpClient depends on program class org.apache.http.HttpResponse
Warning:library class org.apache.http.impl.client.AbstractHttpClient depends on program class org.apache.http.HttpHost
Warning:library class org.apache.http.impl.client.AbstractHttpClient depends on program class org.apache.http.HttpRequest
Warning:library class org.apache.http.impl.client.AbstractHttpClient depends on program class org.apache.http.protocol.HttpContext
Warning:library class org.apache.http.impl.client.AbstractHttpClient depends on program class org.apache.http.HttpResponse
Warning:library class org.apache.http.impl.client.AbstractHttpClient depends on program class org.apache.http.protocol.HttpRequestExecutor
Warning:library class org.apache.http.impl.client.AbstractHttpClient depends on program class org.apache.http.ConnectionReuseStrategy
Warning:library class org.apache.http.impl.client.AbstractHttpClient depends on program class org.apache.http.protocol.HttpProcessor
Warning:library class org.apache.http.impl.client.AbstractHttpClient depends on program class org.apache.http.params.HttpParams
Warning:library class org.apache.http.impl.client.AbstractHttpClient depends on program class org.apache.http.HttpRequest
Warning:library class org.apache.http.impl.client.AbstractHttpClient depends on program class org.apache.http.params.HttpParams
Warning:library class org.apache.http.impl.client.AbstractHttpClient depends on program class org.apache.http.protocol.HttpContext
Warning:library class org.apache.http.impl.client.AbstractHttpClient depends on program class org.apache.http.HttpHost
Warning:library class org.apache.http.impl.client.AbstractHttpClient depends on program class org.apache.http.HttpRequest
Warning:library class org.apache.http.impl.client.AbstractHttpClient depends on program class org.apache.http.HttpHost
Warning:library class org.apache.http.impl.client.AbstractHttpClient depends on program class org.apache.http.HttpRequest
Warning:library class org.apache.http.impl.client.AbstractHttpClient depends on program class org.apache.http.protocol.HttpContext
Warning:library class org.apache.http.impl.client.DefaultHttpClient depends on program class org.apache.http.params.HttpParams
Warning:library class org.apache.http.impl.client.DefaultHttpClient depends on program class org.apache.http.protocol.HttpRequestExecutor
Warning:library class org.apache.http.impl.client.DefaultHttpClient depends on program class org.apache.http.protocol.HttpContext
Warning:library class org.apache.http.impl.client.DefaultHttpClient depends on program class org.apache.http.ConnectionReuseStrategy
Warning:library class org.apache.http.impl.client.DefaultHttpClient depends on program class org.apache.http.protocol.BasicHttpProcessor
Warning:there were 107 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 128 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:Exception while processing task java.io.IOException: Please correct the above warnings first. :app:transformClassesAndResourcesWithProguardForRelease FAILED Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'. > java.io.IOException: Please correct the above warnings first.
我尝试了几次清洁和建造,但同样的错误。
答案 0 :(得分:0)
这是因为您的Proguard已启用:
尝试使用以下行更新您的proguard文件:
// org.apache
-dontwarn org.apache.**
// Jackson
-keep class com.fasterxml.jackson.databind.ObjectMapper {
public <methods>;
protected <methods>;
}
-keep class com.fasterxml.jackson.databind.ObjectWriter {
public ** writeValueAsString(**);
}
-keepnames class com.fasterxml.jackson.** { *; }
-dontwarn com.fasterxml.jackson.databind.**
//OkHttp
-dontwarn com.squareup.okhttp.**
// Picasso
-dontwarn com.squareup.picasso.**
//Okio
-dontwarn okio.**
//Joda Time Convert
-dontwarn org.joda.convert.**
这只是为了帮助您修复apk构建过程,但是您必须测试已签名的apk以检查是否存在它应该需要的任何引用,并且由于代码混淆而无法获取。
我建议您阅读proguard手册,并通过troubleshooting修复是否遇到任何问题