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:there were 52 unresolved references to classes or interfaces.
Warning:Exception while processing task java.io.IOException: Please correct the above warnings first.
Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'.
Job failed, see logs for details
This happens because you enabled minify in your gradle
so add this to you proguard-rules.pro
-dontwarn com.squareup.okhttp.**
Related
When i try use from proguard these errors and warnings are comming and APK file not builds:
Warnings:
org.apache.poi.hssf.usermodel.DummyGraphics2d: can't find superclass
or interface java.awt.Graphics2D
org.apache.poi.hssf.usermodel.EscherGraphics: can't find superclass or
interface java.awt.Graphics
org.apache.poi.hssf.usermodel.EscherGraphics2d: can't find superclass
or interface java.awt.Graphics2D
org.apache.poi.sl.draw.DrawSimpleShape$1: can't find superclass or
interface javax.xml.stream.EventFilter
org.apache.poi.sl.draw.Drawable$DrawableHint: can't find superclass or
interface java.awt.RenderingHints$Key
org.apache.poi.sl.draw.PathGradientPaint: can't find superclass or
interface java.awt.Paint
org.apache.poi.sl.draw.PathGradientPaint$PathGradientContext: can't
find superclass or interface java.awt.PaintContext
org.apache.poi.sl.draw.SLGraphics: can't find superclass or interface
java.awt.Graphics2D org.apache.poi.sl.draw.geom.PresetGeometries$1:
can't find superclass or interface javax.xml.stream.EventFilter
com.fasterxml.jackson.databind.ext.DOMSerializer: can't find
referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry
com.fasterxml.jackson.databind.ext.Java7SupportImpl: can't find
referenced class java.beans.Transient
com.fasterxml.jackson.databind.ext.Java7SupportImpl: can't find
referenced class java.beans.ConstructorProperties
com.fasterxml.jackson.databind.ext.Java7SupportImpl: can't find
referenced class java.beans.Transient
com.fasterxml.jackson.databind.ext.Java7SupportImpl: can't find
referenced class java.beans.ConstructorProperties
com.fasterxml.jackson.databind.ext.Java7SupportImpl: can't find
referenced class java.beans.Transient
com.fasterxml.jackson.databind.ext.Java7SupportImpl: can't find
referenced class java.beans.ConstructorProperties
com.fasterxml.jackson.databind.ext.Java7SupportImpl: can't find
referenced class java.beans.Transient
com.fasterxml.jackson.databind.ext.Java7SupportImpl: can't find
referenced class java.beans.ConstructorProperties
io.jsonwebtoken.impl.Base64Codec: can't find referenced class
javax.xml.bind.DatatypeConverter
io.jsonwebtoken.impl.crypto.EllipticCurveProvider: can't find
referenced class org.bouncycastle.jce.ECNamedCurveTable
org.apache.poi.ddf.EscherMetafileBlip: can't find referenced class
java.awt.Rectangle org.apache.poi.ddf.EscherMetafileBlip: can't find
referenced class java.awt.Dimension
org.apache.poi.ddf.EscherMetafileBlip: can't find referenced class
java.awt.Rectangle org.apache.poi.ddf.EscherMetafileBlip: can't find
referenced class java.awt.Dimension
org.apache.poi.ddf.EscherPictBlip: can't find referenced class
java.awt.Rectangle org.apache.poi.ddf.EscherPictBlip: can't find
referenced class java.awt.Dimension
Errors:
java.lang.RuntimeException: Job failed, see logs for details at
com.android.build.gradle.internal.transforms.ProGuardTransform.transform(ProGuardTransform.java:207)
at
com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:239)
at
com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:235)
at
org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32)org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.lang.Thread.run(Thread.java:745) Caused by:
java.io.IOException: Please correct the above warnings first. at
proguard.Initializer.execute(Initializer.java:485) at
proguard.ProGuard.initialize(ProGuard.java:271) at
proguard.ProGuard.execute(ProGuard.java:113) at
com.android.build.gradle.internal.transforms.BaseProguardAction.runProguard(BaseProguardAction.java:64)
at
com.android.build.gradle.internal.transforms.ProGuardTransform.doMinification(ProGuardTransform.java:262)
at
com.android.build.gradle.internal.transforms.ProGuardTransform.access$000(ProGuardTransform.java:65)
at
com.android.build.gradle.internal.transforms.ProGuardTransform$1.run(ProGuardTransform.java:176)
at com.android.builder.tasks.Job.runTask(Job.java:47) at
com.android.build.gradle.tasks.SimpleWorkQueue$EmptyThreadContext.runTask(SimpleWorkQueue.java:41)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:282) ... 1
more
proguad-rules.pro file
# apache
-keep public class org.apache.poi.** {*;}
What is the problem?
-dontwarn org.apache.poi.**
This solved the issue for me.
build.gradle (Project)
buildscript {
ext.support_version = '27.0.3'
ext.play_service_version = '11.8.0'
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
}
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0-alpha07'
classpath 'com.google.gms:google-services:3.1.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
}
}
allprojects {
repositories {
jcenter()
}
}
allprojects {
repositories {
jcenter()
google()
maven {
url 'https://maven.google.com/'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
build.gradle (app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "xxx.com.xxooking"
minSdkVersion 14
targetSdkVersion 25
versionCode 3
versionName "0.4"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
checkReleaseBuilds false
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support:design:27.1.0'
implementation 'com.squareup.retrofit2:retrofit:2.0.2'
implementation 'com.squareup.retrofit2:converter-gson:2.0.2'
implementation 'com.squareup.retrofit:retrofit:1.9.0'
implementation 'com.orhanobut:dialogplus:1.11#aar'
implementation 'com.google.android.gms:play-services-base:11.8.0'
implementation 'com.google.android.gms:play-services-location:11.8.0'
implementation 'com.google.android.gms:play-services-maps:11.8.0'
implementation 'com.google.android.gms:play-services-places:11.8.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.google.firebase:firebase-database:11.8.0'
implementation 'com.nineoldandroids:library:2.4.0'
implementation 'com.daimajia.slider:library:1.1.5#aar'
implementation 'com.applozic.communication.uiwidget:mobicomkitui:4.85'
testImplementation 'junit:junit:4.12'
androidTestImplementation('com.android.support:design:27.0.0') {
exclude module: "com.android.support:design"
}
}
Proguard-rules-pro
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-verbose
Error:
//// com.google.firebase.messaging.RemoteMessage: can't find superclass or interface com.google.android.gms.common.internal.safeparcel.zza
retrofit.RxSupport$1: can't find superclass or interface rx.Observable$OnSubscribe
retrofit.client.OkClient$1: can't find superclass or interface com.squareup.okhttp.RequestBody
com.google.firebase.iid.zzb: can't find referenced method 'MessengerCompat(android.os.Handler)' in program class com.google.android.gms.iid.MessengerCompat
com.google.firebase.iid.zzb: can't find referenced method 'android.os.IBinder getBinder()' in program class com.google.android.gms.iid.MessengerCompat
com.google.firebase.iid.zzb$1: can't find referenced method 'int zzc(android.os.Message)' in program class com.google.android.gms.iid.MessengerCompat
com.google.firebase.iid.zzh: can't find referenced method 'java.io.File getNoBackupFilesDir(android.content.Context)' in program class com.google.android.gms.common.util.zzw
com.google.firebase.messaging.RemoteMessage: can't find referenced class com.google.android.gms.common.internal.safeparcel.zza
com.google.firebase.messaging.zza: can't find referenced method 'boolean zzyH()' in program class com.google.android.gms.common.util.zzs
com.google.firebase.messaging.zzb: can't find referenced class com.google.android.gms.measurement.AppMeasurement
com.google.firebase.messaging.zzb: can't find referenced class com.google.android.gms.measurement.AppMeasurement$zza
com.google.firebase.messaging.zzb: can't find referenced class com.google.android.gms.measurement.AppMeasurement$zze
com.google.firebase.messaging.zzb: can't find referenced class com.google.android.gms.measurement.AppMeasurement$zzg
com.google.firebase.messaging.zzb: can't find referenced class com.google.android.gms.measurement.AppMeasurement
com.google.firebase.messaging.zzc: can't find referenced class com.google.android.gms.common.internal.safeparcel.zzb
com.google.firebase.messaging.zzc: can't find referenced class com.google.android.gms.common.internal.safeparcel.zzb$zza
com.google.firebase.messaging.zzc: can't find referenced class com.google.android.gms.common.internal.safeparcel.zzc
com.google.firebase.messaging.zzc: can't find referenced class com.google.android.gms.common.internal.safeparcel.zzb
com.google.firebase.messaging.zzc: can't find referenced class com.google.android.gms.common.internal.safeparcel.zzb$zza
com.google.firebase.messaging.zzc: can't find referenced class com.google.android.gms.common.internal.safeparcel.zzc
com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient
com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Cache
com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient
com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.CacheControl
com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.CacheControl$Builder
com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Request$Builder
com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient
com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Call
com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Response
com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.ResponseBody
com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Response
com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.ResponseBody
com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient
com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Cache
com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.CacheControl
com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.CacheControl$Builder
com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Request$Builder
com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Response
com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Cache
com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.CacheControl
com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Request
com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Call
com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Response
com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.ResponseBody
com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.OkHttpClient
com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.CacheControl$Builder
com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.CacheControl
com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Request$Builder
com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Response
com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.ResponseBody
com.squareup.picasso.OkHttpDownloader: can't find referenced class com.squareup.okhttp.Cache
okio.DeflaterSink: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
okio.Okio: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
retrofit.RestMethodInfo$RxSupport: can't find referenced class rx.Observable
retrofit.RxSupport: can't find referenced class rx.Observable
retrofit.RxSupport: can't find referenced class rx.Observable$OnSubscribe
retrofit.RxSupport: can't find referenced class rx.Observable
retrofit.RxSupport: can't find referenced class rx.Subscriber
retrofit.RxSupport$1: can't find referenced class rx.subscriptions.Subscriptions
retrofit.RxSupport$1: can't find referenced class rx.Subscriber
retrofit.RxSupport$1: can't find referenced class rx.Observable$OnSubscribe
retrofit.RxSupport$1: can't find referenced class rx.subscriptions.Subscriptions
retrofit.RxSupport$1: can't find referenced class rx.Observable
retrofit.RxSupport$1: can't find referenced class rx.Subscriber
retrofit.RxSupport$1: can't find referenced class rx.Observable$OnSubscribe
retrofit.RxSupport$2: can't find referenced class rx.Subscriber
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPMethod
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.URLFetchServiceFactory
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.URLFetchService
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPRequest
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPHeader
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPRequest
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPResponse
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPRequest
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPResponse
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPHeader
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPResponse
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPMethod
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPRequest
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPResponse
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPHeader
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPMethod
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.URLFetchServiceFactory
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.URLFetchService
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPResponse
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.URLFetchService
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPMethod
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.URLFetchService
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPRequest
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPResponse
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.URLFetchService
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPRequest
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPResponse
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.URLFetchService
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPRequest
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPMethod
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPRequest
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPResponse
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPRequest
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPHeader
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPResponse
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPRequest
retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPHeader
retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.OkHttpClient
retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.Call
retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.Request$Builder
retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.Response
retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.Request
retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.Response
retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.MediaType
retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.ResponseBody
retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.Headers
retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.OkHttpClient
retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.Request$Builder
retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.Call
retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.Request
retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.Response
retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.MediaType
retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.ResponseBody
retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.Headers
retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.OkHttpClient
retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.Request
retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.Request$Builder
retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.Response
retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.RequestBody
retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.MediaType
retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.ResponseBody
retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.Headers
retrofit.client.OkClient$1: can't find referenced class com.squareup.okhttp.RequestBody
retrofit.client.OkClient$1: can't find referenced class com.squareup.okhttp.MediaType
retrofit.client.OkClient$2: can't find referenced class com.squareup.okhttp.ResponseBody
retrofit.client.OkClient$2: can't find referenced class com.squareup.okhttp.MediaType
retrofit.client.OkClient$2: can't find referenced class com.squareup.okhttp.ResponseBody
retrofit.client.OkClient$2: can't find referenced class com.squareup.okhttp.MediaType
retrofit.client.OkClient$2: can't find referenced class com.squareup.okhttp.ResponseBody
retrofit.client.OkClient$2: can't find referenced class com.squareup.okhttp.MediaType
retrofit.client.OkClient$2: can't find referenced class com.squareup.okhttp.ResponseBody
retrofit.client.OkClient$2: can't find referenced class com.squareup.okhttp.MediaType
retrofit2.Platform$Java8: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
there were 223 unresolved references to classes or interfaces.
Problem:
First proguard time show Lint related error so me add following line in build.gradle(app) file.
After proguard time show all libraries warning message and not proguard apk (without proguard apk working good)
Changes apply both files
> build.gradle (project)
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'
classpath 'com.google.gms:google-services:3.1.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
/// > 2) Build.gradle (app)
change target sdk version 27
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support:design:27.1.0'
When I deploy apk in debug version there is no warning, but when I try to build apk in release version I got this warning, please anybody help.
Warning:com.jjf2017.activity.MainActivity$43$$Lambda$1: can't find referenced class java.lang.invoke.LambdaForm$Hidden
Warning:com.jjf2017.fragment.ArtistIDFragment$$Lambda$1: can't find referenced class java.lang.invoke.LambdaForm$Hidden
Warning:com.jjf2017.fragment.ArtistIDFragment$$Lambda$2: can't find referenced class java.lang.invoke.LambdaForm$Hidden
Warning:com.jjf2017.fragment.ArtistINFragment$$Lambda$1: can't find referenced class java.lang.invoke.LambdaForm$Hidden
Warning:com.jjf2017.fragment.ArtistINFragment$$Lambda$2: can't find referenced class java.lang.invoke.LambdaForm$Hidden
Warning:com.jjf2017.fragment.CcFragment$$Lambda$1: can't find referenced class java.lang.invoke.LambdaForm$Hidden
Warning:com.jjf2017.fragment.TicketFragment$$Lambda$1: can't find referenced class java.lang.invoke.LambdaForm$Hidden
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:retrofit2.Platform$Java8: can't find referenced class java.lang.invoke.MethodHandles$Lookup
Warning:retrofit2.Platform$Java8: can't find referenced class java.lang.invoke.MethodHandle
Warning:retrofit2.Platform$Java8: can't find referenced class java.lang.invoke.MethodHandles
Warning:retrofit2.Platform$Java8: can't find referenced class java.lang.invoke.MethodHandle
Warning:retrofit2.Platform$Java8: can't find referenced class java.lang.invoke.MethodHandles$Lookup
Warning:retrofit2.Platform$Java8: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
Warning:there were 52 unresolved references to classes or interfaces.
Warning:Exception while processing task java.io.IOException: Please correct the above warnings first.
Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'.
Job failed, see logs for details
Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease' means that
you're using proguard in release.
Try to set minifyEnabled option in your build.gradle file to false.
Like this:
buildTypes {
release {
minifyEnabled false
...
}
}
if your app still working when you make
minifyEnabled false
then you have to dontwarn manually every warning that you have with -dontwarn
Exempel: -dontwarn java.lang.invoke.**
Error:Execution failed for task
':app:transformClassesAndResourcesWithProguardForRelease'.
java.io.IOException: Please correct the above warnings first.
I have tried my best to find the solution but I did not get, whereas I found many questions.
Is there anything to ignore these warnings, I just want to generate a secure signed apk, therefore I have used minifyEnabled true
Message:
Warning:retrofit.client.OkClient$1: can't find superclass or interface com.squareup.okhttp.RequestBody
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:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPMethod
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.URLFetchServiceFactory
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.URLFetchService
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPRequest
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPHeader
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPRequest
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPResponse
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPRequest
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPResponse
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPHeader
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPResponse
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPMethod
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPRequest
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPResponse
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPHeader
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPMethod
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.URLFetchServiceFactory
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.URLFetchService
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPResponse
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.URLFetchService
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPMethod
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.URLFetchService
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPRequest
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPResponse
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.URLFetchService
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPRequest
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPResponse
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.URLFetchService
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPRequest
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPMethod
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPRequest
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPResponse
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPRequest
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPHeader
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPResponse
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPRequest
Warning:retrofit.appengine.UrlFetchClient: can't find referenced class com.google.appengine.api.urlfetch.HTTPHeader
Warning:retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.OkHttpClient
Warning:retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.Call
Warning:retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.Request$Builder
Warning:retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.Response
Warning:retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.Request
Warning:retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.Response
Warning:retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.MediaType
Warning:retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.ResponseBody
Warning:retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.Headers
Warning:retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.OkHttpClient
Warning:retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.Request$Builder
Warning:retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.Call
Warning:retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.Request
Warning:retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.Response
Warning:retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.MediaType
Warning:retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.ResponseBody
Warning:retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.Headers
Warning:retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.OkHttpClient
Warning:retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.Request
Warning:retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.Request$Builder
Warning:retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.Response
Warning:retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.RequestBody
Warning:retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.MediaType
Warning:retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.ResponseBody
Warning:retrofit.client.OkClient: can't find referenced class com.squareup.okhttp.Headers
Warning:retrofit.client.OkClient$1: can't find referenced class com.squareup.okhttp.RequestBody
Warning:retrofit.client.OkClient$1: can't find referenced class okio.BufferedSink
Warning:retrofit.client.OkClient$1: can't find referenced class com.squareup.okhttp.RequestBody
Warning:retrofit.client.OkClient$1: can't find referenced class okio.BufferedSink
Warning:retrofit.client.OkClient$1: can't find referenced class com.squareup.okhttp.MediaType
Warning:retrofit.client.OkClient$1: can't find referenced class okio.BufferedSink
Warning:retrofit.client.OkClient$2: can't find referenced class com.squareup.okhttp.ResponseBody
Warning:retrofit.client.OkClient$2: can't find referenced class com.squareup.okhttp.MediaType
Warning:retrofit.client.OkClient$2: can't find referenced class com.squareup.okhttp.ResponseBody
Warning:retrofit.client.OkClient$2: can't find referenced class com.squareup.okhttp.MediaType
Warning:retrofit.client.OkClient$2: can't find referenced class com.squareup.okhttp.ResponseBody
Warning:retrofit.client.OkClient$2: can't find referenced class com.squareup.okhttp.MediaType
Warning:retrofit.client.OkClient$2: can't find referenced class com.squareup.okhttp.ResponseBody
Warning:retrofit.client.OkClient$2: can't find referenced class com.squareup.okhttp.MediaType
Warning:rx.internal.util.unsafe.ConcurrentCircularArrayQueue: can't find referenced class sun.misc.Unsafe
Warning:rx.internal.util.unsafe.ConcurrentSequencedCircularArrayQueue: can't find referenced class sun.misc.Unsafe
Warning:rx.internal.util.unsafe.MpmcArrayQueueConsumerField: can't find referenced class sun.misc.Unsafe
Warning:rx.internal.util.unsafe.MpmcArrayQueueProducerField: can't find referenced class sun.misc.Unsafe
Warning:rx.internal.util.unsafe.SpmcArrayQueueConsumerField: can't find referenced class sun.misc.Unsafe
Warning:rx.internal.util.unsafe.SpmcArrayQueueProducerField: can't find referenced class sun.misc.Unsafe
Warning:rx.internal.util.unsafe.SpscArrayQueueConsumerField: can't find referenced class sun.misc.Unsafe
Warning:rx.internal.util.unsafe.SpscArrayQueueProducerFields: can't find referenced class sun.misc.Unsafe
Warning:rx.internal.util.unsafe.UnsafeAccess: can't find referenced class sun.misc.Unsafe
When you use ProGuard you have to always resolve all warnings to be able to process further with the build.
These warnings tell you that the libraries reference some code and there are no sources for that. That might and might not be ok. It depends if the problematic code ever get called.
In this case the libraries reference some code but the code doesn't seem to be ever called (e.g. because you didn't add some other library). In that case add -dontwarn rules to proguard-rules.pro file.
You use Retrofit and Picasso libraries. Try adding these rules:
-dontwarn okio.**
-dontwarn retrofit.**
-keep class retrofit.** { *; }
-keepclassmembers,allowobfuscation interface * {
#retrofit.http.** <methods>;
}
-dontwarn com.squareup.okhttp.**
It might fix your problem.
Note that you might experience further problems in runtime especially if any of those libraries use reflection and the code was shrunk and/or obfuscated. Then it's probable that you'll need more ProGuard rules for other libraries.
Edit:
To resolve RxJava related warnings add this dependency:
// ProGuard rules for RxJava
compile 'com.artemzin.rxjava:proguard-rules:1.1.1.0'
It adds necessary ProGuard rules for RxJava.
I had the same issue, and solved it by adding the following text to proguard-project.txt:
# for transformClassesAndResourcesWithProguardForRelease
# -- Picasso --
-dontwarn com.squareup.picasso.**
# -- OkHttp --
-dontwarn com.squareup.okhttp.internal.**
# -- Apache Commons --
-dontwarn org.apache.commons.logging.**
-ignorewarnings
-keep class *
{
public private *;
}
I am using Parse on a project. The project uses my own Android library project which has the Parse jars in it. When I try to generate a signed apk, gradle gives the following issue:
:exampleApp:proguardRelease Warning:
com.parse.ParseOkHttpClient$CountingOkHttpRequestBody: can't find
superclass or interface com.squareup.okhttp.RequestBody Warning:
com.fasterxml.jackson.databind.ext.DOMSerializer: can't find
referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry
Warning: com.fasterxml.jackson.databind.ext.DOMSerializer: can't find
referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry
Warning: com.fasterxml.jackson.databind.ext.DOMSerializer: can't find
referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry
Warning: com.fasterxml.jackson.databind.ext.DOMSerializer: can't find
referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry
Warning: com.parse.ParseOkHttpClient: can't find referenced class
com.squareup.okhttp.OkHttpClient Warning: com.parse.ParseOkHttpClient:
can't find referenced class com.squareup.okhttp.OkHttpClient Warning:
com.parse.ParseOkHttpClient: can't find referenced class
com.squareup.okhttp.OkHttpClient Warning: com.parse.ParseOkHttpClient:
can't find referenced class com.squareup.okhttp.OkHttpClient Warning:
com.parse.ParseOkHttpClient: can't find referenced class
com.squareup.okhttp.OkHttpClient Warning: com.parse.ParseOkHttpClient:
can't find referenced class com.squareup.okhttp.OkHttpClient Warning:
com.parse.ParseOkHttpClient: can't find referenced class
com.squareup.okhttp.OkHttpClient Warning: com.parse.ParseOkHttpClient:
can't find referenced class com.squareup.okhttp.OkHttpClient Warning:
com.parse.ParseOkHttpClient: can't find referenced class
com.squareup.okhttp.Call Warning: com.parse.ParseOkHttpClient: can't
find referenced class com.squareup.okhttp.Response Warning:
com.parse.ParseOkHttpClient: can't find referenced class
com.squareup.okhttp.Response Warning: com.parse.ParseOkHttpClient:
can't find referenced class com.squareup.okhttp.ResponseBody Warning:
com.parse.ParseOkHttpClient: can't find referenced class
com.squareup.okhttp.ResponseBody Warning: com.parse.ParseOkHttpClient:
can't find referenced class com.squareup.okhttp.Response Warning:
com.parse.ParseOkHttpClient: can't find referenced class
com.squareup.okhttp.Request$Builder Warning:
com.parse.ParseOkHttpClient: can't find referenced class
com.squareup.okhttp.Request$Builder Warning:
com.parse.ParseOkHttpClient: can't find referenced class
com.squareup.okhttp.Request$Builder Warning:
com.parse.ParseOkHttpClient: can't find referenced class
com.squareup.okhttp.Request$Builder Warning:
com.parse.ParseOkHttpClient: can't find referenced class
com.squareup.okhttp.Request$Builder Warning:
com.parse.ParseOkHttpClient: can't find referenced class
com.squareup.okhttp.Headers$Builder Warning:
com.parse.ParseOkHttpClient: can't find referenced class
com.squareup.okhttp.Headers$Builder Warning:
com.parse.ParseOkHttpClient: can't find referenced class
com.squareup.okhttp.Headers$Builder Warning:
com.parse.ParseOkHttpClient: can't find referenced class
com.squareup.okhttp.Headers$Builder Warning:
com.parse.ParseOkHttpClient: can't find referenced class
com.squareup.okhttp.Request$Builder Warning:
com.parse.ParseOkHttpClient: can't find referenced class
com.squareup.okhttp.Request$Builder Warning:
com.parse.ParseOkHttpClient: can't find referenced class
com.squareup.okhttp.Request$Builder Warning:
com.parse.ParseOkHttpClient: can't find referenced class
com.squareup.okhttp.Request$Builder Warning:
com.parse.ParseOkHttpClient: can't find referenced class
com.squareup.okhttp.Response Warning: com.parse.ParseOkHttpClient:
can't find referenced class com.squareup.okhttp.Request$Builder
Warning: com.parse.ParseOkHttpClient: can't find referenced class
com.squareup.okhttp.Headers$Builder Warning:
com.parse.ParseOkHttpClient: can't find referenced class
com.squareup.okhttp.Headers Warning: com.parse.ParseOkHttpClient:
can't find referenced class com.squareup.okhttp.Call Warning:
com.parse.ParseOkHttpClient: can't find referenced class
com.squareup.okhttp.ResponseBody Warning: com.parse.ParseOkHttpClient:
can't find referenced class com.squareup.okhttp.Request Warning:
com.parse.ParseOkHttpClient: can't find referenced class
com.squareup.okhttp.Headers Warning: com.parse.ParseOkHttpClient:
can't find referenced class com.squareup.okhttp.OkHttpClient Warning:
com.parse.ParseOkHttpClient: can't find referenced class
com.squareup.okhttp.Request Warning: com.parse.ParseOkHttpClient:
can't find referenced class com.squareup.okhttp.Call Warning:
com.parse.ParseOkHttpClient: can't find referenced class
com.squareup.okhttp.Response Warning: com.parse.ParseOkHttpClient:
can't find referenced class com.squareup.okhttp.Call Warning:
com.parse.ParseOkHttpClient: can't find referenced class
com.squareup.okhttp.Call Warning: com.parse.ParseOkHttpClient: can't
find referenced class com.squareup.okhttp.Response Warning:
com.parse.ParseOkHttpClient: can't find referenced class
com.squareup.okhttp.Response Warning: com.parse.ParseOkHttpClient:
can't find referenced class com.squareup.okhttp.Request Warning:
com.parse.ParseOkHttpClient: can't find referenced class
com.squareup.okhttp.Request$Builder Warning:
com.parse.ParseOkHttpClient: can't find referenced class
com.squareup.okhttp.Headers$Builder Warning:
com.parse.ParseOkHttpClient: can't find referenced class
com.squareup.okhttp.Headers Warning: com.parse.ParseOkHttpClient:
can't find referenced class com.squareup.okhttp.Request Warning:
com.parse.ParseOkHttpClient: can't find referenced class
com.squareup.okhttp.Response Warning: com.parse.ParseOkHttpClient$1:
can't find referenced class com.squareup.okhttp.Call Warning:
com.parse.ParseOkHttpClient$1: can't find referenced class
com.squareup.okhttp.Call Warning: com.parse.ParseOkHttpClient$1: can't
find referenced class com.squareup.okhttp.Call Warning:
com.parse.ParseOkHttpClient$1: can't find referenced class
com.squareup.okhttp.Call 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.parse.ParseOkHttpClient$CountingOkHttpRequestBody: can't find
referenced class okio.BufferedSink 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.parse.ParseOkHttpClient$CountingOkHttpRequestBody: can't find
referenced class okio.BufferedSink Warning:
com.parse.ParseOkHttpClient$CountingOkHttpRequestBody: can't find
referenced class com.squareup.okhttp.MediaType Warning:
com.parse.ParseOkHttpClient$CountingOkHttpRequestBody: can't find
referenced class okio.BufferedSink Warning:
com.parse.ParseOkHttpClient$CountingOkHttpRequestBody: can't find
referenced class okio.BufferedSink Warning: there were 67 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)
:exampleApp:proguardRelease FAILED
FAILURE: Build failed with an exception.
Edit:
Per #karama's suggestion, I added this to my proguard rules:
-keepattributes *Annotation*
-keepattributes Signature
-dontwarn com.squareup.**
-keep class com.squareup.** { *; }
-dontwarn com.parse.ParseOkHttpClient**
-keep class com.parse.ParseOkHttpClient** { *; }
# Proguard configuration for Jackson 2.x (fasterxml package instead of codehaus package)
-keep class com.fasterxml.jackson.databind.ObjectMapper {
public <methods>;
protected <methods>;
}
-keep class com.fasterxml.jackson.databind.ObjectWriter {
public ** writeValueAsString(**);
}
-dontwarn org.w3c.dom.bootstrap.DOMImplementationRegistry
Yet, now I get the following:
Warning: com.fasterxml.jackson.databind.ext.DOMSerializer: can't find
referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry
Warning: com.fasterxml.jackson.databind.ext.DOMSerializer: can't find
referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry
Warning: com.fasterxml.jackson.databind.ext.DOMSerializer: can't find
referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry
Warning: com.fasterxml.jackson.databind.ext.DOMSerializer: can't find
referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry
Warning: com.fasterxml.jackson.databind.ext.DOMSerializer: can't find
referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry
Warning: there were 5 unresolved references to classes or interfaces.
If I fix it with adding:
-dontwarn org.w3c.dom.bootstrap.DOMImplementationRegistry
When the app runs, it crashes. I saw this issue here but with no resolution: https://stackoverflow.com/a/11249755/197127
Running the app with -dontobfuscate works fine.
The error is not of parse sdk, it occures because of okHttp. Add below lines in your proguard.
-keepattributes *Annotation*
-keepattributes Signature
-dontwarn com.squareup.**
-keep class com.squareup.** { *; }
Edit
for com.fasterxml.jackson add below code :
-keep class com.fasterxml.jackson.databind.ObjectMapper {
public <methods>;
protected <methods>;
}
-keep class com.fasterxml.jackson.databind.ObjectWriter {
public ** writeValueAsString(**);
}
reference : https://github.com/krschultz/android-proguard-snippets/issues/19