我正在尝试使用minifyEnabled true编译我的apk

 buildTypes {
    release {
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        signingConfig signingConfigs.config
    }
}


我知道我需要在“ proguard-rules.pro”文件中写入“ dontwarn”,但我不知道确切在此处写的内容只是警告的一小部分:

interface javax.annotation.processing.AbstractProcessor
Warning:com.parse.ParseOkHttpClient$CountingOkHttpRequestBody: can't find superclass or interface com.squareup.okhttp.RequestBody
Warning:butterknife.internal.ButterKnifeProcessor: can't find referenced class javax.annotation.processing.AbstractProcessor
Warning:butterknife.internal.ButterKnifeProcessor: can't find referenced class javax.annotation.processing.ProcessingEnvironment
Warning:butterknife.internal.ButterKnifeProcessor: can't find referenced
Warning:com.google.android.gms.internal.zzac: can't find referenced class android.net.http.AndroidHttpClient
Warning:com.google.android.gms.internal.zzw: can't find referenced method 'void addHeader(java.lang.String,java.lang.String)' in program class com.google.android.gms.internal.zzw$zza
Warning:com.google.android.gms.internal.zzw$zza: can't find referenced method 'void setURI(java.net.URI)' in program class com.google.android.gms.internal.zzw$zza
Warning:com.parse.NotificationCompat$NotificationCompatImplBase: can't find referenced method 'void setLatestEventInfo(android.content.Context,java.lang.CharSequence,java.lang.CharSequence,android.app.PendingIntent)' in library class android.app.Notification
Warning:com.parse.ParseApacheHttpClient: can't find referenced method 'org.apache.http.conn.ssl.SSLSocketFactory getHttpSocketFactory(int,android.net.SSLSessionCache)' in library class android.net.SSLCertificateSocketFactory
Warning:com.parse.ParseApacheHttpClient: can't find referenced class android.net.http.AndroidHttpClient
Warning:com.parse.ParseNotificationManager: can't find referenced method 'void setLatestEventInfo(android.content.Context,java.lang.CharSequence,java.lang.CharSequence,android.app.PendingIntent)' in library class android.app.Notification
Warning:com.parse.ParseOkHttpClient: can't find referenced class com.squareup.okhttp.OkHttpClient
Warning:com.parse.ParseOkHttpClient: can't find referenced class
Warning:com.parse.ParseOkHttpClient: can't find referenced class com.squareup.okhttp.Response
Warning:com.parse.ParseOkHttpClient$CountingOkHttpRequestBody: can't find referenced class com.squareup.okhttp.RequestBody
Warning:com.parse.ParseOkHttpClient$CountingOkHttpRequestBody: can't find referenced class com.squareup.okhttp.MediaType

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


.....
> Unable to compute hash of C:\...\classes.jar

最佳答案

如果您真的很需要构建它,请在build.gradle文件中禁用minifyEnabled(minifyEnabled为false)。之后重新启用它。

对于毕加索,您可以尝试执行以下操作:

-dontwarn com.squareup.picasso.**


等等

07-26 02:07