I am getting noClassDefFoundError on phones running less than API Version 21. First it was coming with other classes, after removing all the possible codes, it started to coming with Picasso library. I have attached my logcat and build.gradle.
Please help me, I am stucked, I have tried many solution, but no one is working.
Simmilar questions I found are - https://github.com/square/picasso/issues/1264
build.gradle -
compileSdkVersion 23
buildToolsVersion "23.0.3"
useLibrary 'org.apache.http.legacy'
dexOptions {
incremental false
javaMaxHeapSize "2048M"
preDexLibraries = false
}
defaultConfig {
applicationId "com.kaaryanext.raghukaka"
minSdkVersion 15
targetSdkVersion 23
versionCode 25
versionName "1.2.14"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-android.txt'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:multidex:1.0.0'
compile 'com.google.code.gson:gson:2.2.4'
compile('com.android.support:appcompat-v7:23.1.1') {
exclude module: 'support-v4'
}
compile 'com.crittercism:crittercism-android-agent:5.0.6'
compile 'com.android.support:support-v4:23.1.1'
compile "com.android.support:recyclerview-v7:23.1.0"
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
compile "com.google.android.gms:play-services:8.1.0"
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.android.support:design:23.1.1'
compile 'com.getbase:floatingactionbutton:1.10.0'
compile 'com.loopj.android:android-async-http:1.4.9'
}
04-18 09:53:10.990 16825-16825/com.kaaryanext.raghukaka E/dalvikvm: Could not find class 'com.squareup.picasso.Picasso$1', referenced from method com.squareup.picasso.Picasso. 04-18 09:53:10.990 16825-16825/com.kaaryanext.raghukaka W/dalvikvm: VFY: unable to resolve new-instance 9172 (Lcom/squareup/picasso/Picasso$1;) in Lcom/squareup/picasso/Picasso; 04-18 09:53:10.990 16825-16825/com.kaaryanext.raghukaka D/dalvikvm: VFY: replacing opcode 0x22 at 0x0000 04-18 09:53:11.000 16825-16825/com.kaaryanext.raghukaka W/dalvikvm: VFY: unable to find class referenced in signature (Lcom/squareup/picasso/Dispatcher;) 04-18 09:53:11.000 16825-16825/com.kaaryanext.raghukaka W/dalvikvm: VFY: unable to find class referenced in signature (Lcom/squareup/picasso/Cache;) 04-18 09:53:11.000 16825-16825/com.kaaryanext.raghukaka W/dalvikvm: VFY: unable to find class referenced in signature (Lcom/squareup/picasso/Stats;) 04-18 09:53:11.000 16825-16825/com.kaaryanext.raghukaka E/dalvikvm: Could not find class 'com.squareup.picasso.ResourceRequestHandler', referenced from method com.squareup.picasso.Picasso. 04-18 09:53:11.000 16825-16825/com.kaaryanext.raghukaka W/dalvikvm: VFY: unable to resolve new-instance 9190 (Lcom/squareup/picasso/ResourceRequestHandler;) in Lcom/squareup/picasso/Picasso; 04-18 09:53:11.000 16825-16825/com.kaaryanext.raghukaka D/dalvikvm: VFY: replacing opcode 0x22 at 0x001d 04-18 09:53:11.000 16825-16825/com.kaaryanext.raghukaka I/dalvikvm: Could not find method com.squareup.picasso.Utils.checkMain, referenced from method com.squareup.picasso.Picasso.cancelExistingRequest 04-18 09:53:11.000 16825-16825/com.kaaryanext.raghukaka W/dalvikvm: VFY: unable to resolve static method 61383: Lcom/squareup/picasso/Utils;.checkMain ()V 04-18 09:53:11.000 16825-16825/com.kaaryanext.raghukaka D/dalvikvm: VFY: replacing opcode 0x71 at 0x0000 04-18 09:53:11.000 16825-16825/com.kaaryanext.raghukaka W/dalvikvm: VFY: unable to find class referenced in signature (Lcom/squareup/picasso/Action;) 04-18 09:53:11.000 16825-16825/com.kaaryanext.raghukaka I/dalvikvm: Could not find method com.squareup.picasso.Action.isCancelled, referenced from method com.squareup.picasso.Picasso.deliverAction 04-18 09:53:11.000 16825-16825/com.kaaryanext.raghukaka W/dalvikvm: VFY: unable to resolve virtual method 61214: Lcom/squareup/picasso/Action;.isCancelled ()Z 04-18 09:53:11.000 16825-16825/com.kaaryanext.raghukaka D/dalvikvm: VFY: replacing opcode 0x6e at 0x0000 04-18 09:53:11.000 16825-16825/com.kaaryanext.raghukaka E/dalvikvm: Could not find class 'com.squareup.picasso.RemoteViewsAction$RemoteViewsTarget', referenced from method com.squareup.picasso.Picasso.cancelRequest 04-18 09:53:11.010 16825-16825/com.kaaryanext.raghukaka W/dalvikvm: VFY: unable to resolve new-instance 9184 (Lcom/squareup/picasso/RemoteViewsAction$RemoteViewsTarget;) in Lcom/squareup/picasso/Picasso; 04-18 09:53:11.010 16825-16825/com.kaaryanext.raghukaka D/dalvikvm: VFY: replacing opcode 0x22 at 0x0000 04-18 09:53:11.010 16825-16825/com.kaaryanext.raghukaka W/dalvikvm: VFY: unable to find class referenced in signature (Lcom/squareup/picasso/Target;) 04-18 09:53:11.010 16825-16825/com.kaaryanext.raghukaka I/dalvikvm: Could not find method com.squareup.picasso.Utils.checkMain, referenced from method com.squareup.picasso.Picasso.cancelTag 04-18 09:53:11.010 16825-16825/com.kaaryanext.raghukaka W/dalvikvm: VFY: unable to resolve static method 61383: Lcom/squareup/picasso/Utils;.checkMain ()V 04-18 09:53:11.010 16825-16825/com.kaaryanext.raghukaka D/dalvikvm: VFY: replacing opcode 0x71 at 0x0000 04-18 09:53:11.010 16825-16825/com.kaaryanext.raghukaka W/dalvikvm: VFY: unable to find class referenced in signature (Lcom/squareup/picasso/BitmapHunter;) 04-18 09:53:11.010 16825-16825/com.kaaryanext.raghukaka I/dalvikvm: Could not find method com.squareup.picasso.BitmapHunter.getAction, referenced from method com.squareup.picasso.Picasso.complete 04-18 09:53:11.010 16825-16825/com.kaaryanext.raghukaka W/dalvikvm: VFY: unable to resolve virtual method 61218: Lcom/squareup/picasso/BitmapHunter;.getAction ()Lcom/squareup/picasso/Action; 04-18 09:53:11.010 16825-16825/com.kaaryanext.raghukaka D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002 04-18 09:53:11.010 16825-16825/com.kaaryanext.raghukaka W/dalvikvm: VFY: unable to find class referenced in signature (Lcom/squareup/picasso/DeferredRequestCreator;) 04-18 09:53:11.010 16825-16825/com.kaaryanext.raghukaka W/dalvikvm: VFY: unable to find class referenced in signature (Lcom/squareup/picasso/Action;) 04-18 09:53:11.010 16825-16825/com.kaaryanext.raghukaka I/dalvikvm: Could not find method com.squareup.picasso.Action.getTarget, referenced from method com.squareup.picasso.Picasso.enqueueAndSubmit 04-18 09:53:11.010 16825-16825/com.kaaryanext.raghukaka W/dalvikvm: VFY: unable to resolve virtual method 61213: Lcom/squareup/picasso/Action;.getTarget ()Ljava/lang/Object; 04-18 09:53:11.010 16825-16825/com.kaaryanext.raghukaka D/dalvikvm: VFY: replacing opcode 0x6e at 0x0000 04-18 09:53:11.020 16825-16825/com.kaaryanext.raghukaka I/dalvikvm: Could not find method com.squareup.picasso.Stats.createSnapshot, referenced from method com.squareup.picasso.Picasso.getSnapshot 04-18 09:53:11.020 16825-16825/com.kaaryanext.raghukaka W/dalvikvm: VFY: unable to resolve virtual method 61376: Lcom/squareup/picasso/Stats;.createSnapshot ()Lcom/squareup/picasso/StatsSnapshot; 04-18 09:53:11.020 16825-16825/com.kaaryanext.raghukaka D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002 04-18 09:53:11.020 16825-16825/com.kaaryanext.raghukaka I/dalvikvm: Could not find method com.squareup.picasso.Cache.clearKeyUri, referenced from method com.squareup.picasso.Picasso.invalidate 04-18 09:53:11.020 16825-16825/com.kaaryanext.raghukaka W/dalvikvm: VFY: unable to resolve interface method 61226: Lcom/squareup/picasso/Cache;.clearKeyUri (Ljava/lang/String;)V 04-18 09:53:11.020 16825-16825/com.kaaryanext.raghukaka D/dalvikvm: VFY: replacing opcode 0x72 at 0x0010 04-18 09:53:11.020 16825-16825/com.kaaryanext.raghukaka I/dalvikvm: Could not find method com.squareup.picasso.Dispatcher.dispatchPauseTag, referenced from method com.squareup.picasso.Picasso.pauseTag 04-18 09:53:11.020 16825-16825/com.kaaryanext.raghukaka W/dalvikvm: VFY: unable to resolve virtual method 61235: Lcom/squareup/picasso/Dispatcher;.dispatchPauseTag (Ljava/lang/Object;)V 04-18 09:53:11.020 16825-16825/com.kaaryanext.raghukaka D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002 04-18 09:53:11.030 16825-16825/com.kaaryanext.raghukaka I/dalvikvm: Could not find method com.squareup.picasso.Cache.get, referenced from method com.squareup.picasso.Picasso.quickMemoryCacheCheck 04-18 09:53:11.030 16825-16825/com.kaaryanext.raghukaka W/dalvikvm: VFY: unable to resolve interface method 61227: Lcom/squareup/picasso/Cache;.get (Ljava/lang/String;)Landroid/graphics/Bitmap; 04-18 09:53:11.030 16825-16825/com.kaaryanext.raghukaka D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002 04-18 09:53:11.030 16825-16825/com.kaaryanext.raghukaka W/dalvikvm: VFY: unable to find class referenced in signature (Lcom/squareup/picasso/Action;) 04-18 09:53:11.030 16825-16825/com.kaaryanext.raghukaka W/dalvikvm: VFY: unable to resolve instance field 34051 04-18 09:53:11.030 16825-16825/com.kaaryanext.raghukaka D/dalvikvm: VFY: replacing opcode 0x52 at 0x0001 04-18 09:53:11.030 16825-16825/com.kaaryanext.raghukaka I/dalvikvm: Could not find method com.squareup.picasso.Dispatcher.dispatchResumeTag, referenced from method com.squareup.picasso.Picasso.resumeTag 04-18 09:53:11.030 16825-16825/com.kaaryanext.raghukaka W/dalvikvm: VFY: unable to resolve virtual method 61236: Lcom/squareup/picasso/Dispatcher;.dispatchResumeTag (Ljava/lang/Object;)V 04-18 09:53:11.030 16825-16825/com.kaaryanext.raghukaka D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002 04-18 09:53:11.030 16825-16825/com.kaaryanext.raghukaka I/dalvikvm: Could not find method com.squareup.picasso.Cache.clear, referenced from method com.squareup.picasso.Picasso.shutdown 04-18 09:53:11.030 16825-16825/com.kaaryanext.raghukaka W/dalvikvm: VFY: unable to resolve interface method 61225: Lcom/squareup/picasso/Cache;.clear ()V 04-18 09:53:11.030 16825-16825/com.kaaryanext.raghukaka D/dalvikvm: VFY: replacing opcode 0x72 at 0x0013 04-18 09:53:11.030 16825-16825/com.kaaryanext.raghukaka W/dalvikvm: VFY: unable to find class referenced in signature (Lcom/squareup/picasso/Action;) 04-18 09:53:11.030 16825-16825/com.kaaryanext.raghukaka I/dalvikvm: Could not find method com.squareup.picasso.Dispatcher.dispatchSubmit, referenced from method com.squareup.picasso.Picasso.submit 04-18 09:53:11.040 16825-16825/com.kaaryanext.raghukaka W/dalvikvm: VFY: unable to resolve virtual method 61237: Lcom/squareup/picasso/Dispatcher;.dispatchSubmit (Lcom/squareup/picasso/Action;)V 04-18 09:53:11.040 16825-16825/com.kaaryanext.raghukaka D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002 04-18 09:53:11.040 16825-16825/com.kaaryanext.raghukaka W/dalvikvm: VFY: unable to find class referenced in signature (Lcom/squareup/picasso/Request;) 04-18 09:53:11.040 16825-16825/com.kaaryanext.raghukaka I/dalvikvm: Could not find method com.squareup.picasso.Picasso$RequestTransformer.transformRequest, referenced from method com.squareup.picasso.Picasso.transformRequest 04-18 09:53:11.040 16825-16825/com.kaaryanext.raghukaka W/dalvikvm: VFY: unable to resolve interface method 61271: Lcom/squareup/picasso/Picasso$RequestTransformer;.transformRequest (Lcom/squareup/picasso/Request;)Lcom/squareup/picasso/Request; 04-18 09:53:11.040 16825-16825/com.kaaryanext.raghukaka D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002 04-18 09:53:11.040 16825-16825/com.kaaryanext.raghukaka D/dalvikvm: DexOpt: unable to opt direct call 0xef46 at 0x06 in Lcom/squareup/picasso/Picasso;. 04-18 09:53:11.040 16825-16825/com.kaaryanext.raghukaka D/dalvikvm: DexOpt: unable to opt direct call 0xefbe at 0x1f in Lcom/squareup/picasso/Picasso;. 04-18 09:53:11.040 16825-16825/com.kaaryanext.raghukaka D/dalvikvm: DexOpt: unable to opt direct call 0xef2d at 0x2c in Lcom/squareup/picasso/Picasso;. 04-18 09:53:11.040 16825-16825/com.kaaryanext.raghukaka D/dalvikvm: DexOpt: unable to opt direct call 0xef43 at 0x34 in Lcom/squareup/picasso/Picasso;. 04-18 09:53:11.050 16825-16825/com.kaaryanext.raghukaka D/dalvikvm: DexOpt: unable to opt direct call 0xef2e at 0x3c in Lcom/squareup/picasso/Picasso;. 04-18 09:53:11.050 16825-16825/com.kaaryanext.raghukaka D/dalvikvm: DexOpt: unable to opt direct call 0xef20 at 0x44 in Lcom/squareup/picasso/Picasso;. 04-18 09:53:11.050 16825-16825/com.kaaryanext.raghukaka D/dalvikvm: DexOpt: unable to opt direct call 0xef3f at 0x4c in Lcom/squareup/picasso/Picasso;. 04-18 09:53:11.050 16825-16825/com.kaaryanext.raghukaka I/dalvikvm: DexOpt: unable to optimize instance field ref 0x8505 at 0x54 in Lcom/squareup/picasso/Picasso;. 04-18 09:53:11.050 16825-16825/com.kaaryanext.raghukaka D/dalvikvm: DexOpt: unable to opt direct call 0xef45 at 0x56 in Lcom/squareup/picasso/Picasso;. 04-18 09:53:11.050 16825-16825/com.kaaryanext.raghukaka D/dalvikvm: DexOpt: unable to opt direct call 0xef53 at 0x87 in Lcom/squareup/picasso/Picasso;. 04-18 09:53:11.050 16825-16825/com.kaaryanext.raghukaka I/dalvikvm: DexOpt: unable to optimize instance field ref 0x8504 at 0x2d in Lcom/squareup/picasso/Picasso;.deliverAction 04-18 09:53:11.050 16825-16825/com.kaaryanext.raghukaka I/dalvikvm: DexOpt: unable to optimize instance field ref 0x8504 at 0x55 in Lcom/squareup/picasso/Picasso;.deliverAction 04-18 09:53:11.050 16825-16825/com.kaaryanext.raghukaka D/dalvikvm: DexOpt: unable to opt direct call 0xef81 at 0x02 in Lcom/squareup/picasso/Picasso;.cancelRequest 04-18 09:53:11.060 16825-16825/com.kaaryanext.raghukaka I/dalvikvm: DexOpt: unable to optimize instance field ref 0x852f at 0x21 in Lcom/squareup/picasso/Picasso;.complete 04-18 09:53:11.060 16825-16825/com.kaaryanext.raghukaka I/dalvikvm: DexOpt: unable to optimize static field ref 0x8518 at 0x13 in Lcom/squareup/picasso/Picasso;.resumeAction 04-18 09:53:11.060 16825-16825/com.kaaryanext.raghukaka I/dalvikvm: DexOpt: unable to optimize instance field ref 0x8504 at 0x20 in Lcom/squareup/picasso/Picasso;.resumeAction 04-18 09:53:11.060 16825-16825/com.kaaryanext.raghukaka I/dalvikvm: DexOpt: unable to optimize static field ref 0x8518 at 0x31 in Lcom/squareup/picasso/Picasso;.resumeAction 04-18 09:53:11.060 16825-16825/com.kaaryanext.raghukaka I/dalvikvm: DexOpt: unable to optimize instance field ref 0x8504 at 0x4a in Lcom/squareup/picasso/Picasso;.resumeAction 04-18 09:53:11.060 16825-16825/com.kaaryanext.raghukaka W/dalvikvm: Exception Ljava/lang/NoClassDefFoundError; thrown while initializing Lcom/squareup/picasso/Picasso; 04-18 09:53:11.060 16825-16825/com.kaaryanext.raghukaka D/AndroidRuntime: Shutting down VM 04-18 09:53:11.060 16825-16825/com.kaaryanext.raghukaka W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x418b1c80) 04-18 09:53:11.080 16825-16825/com.kaaryanext.raghukaka E/AndroidRuntime: FATAL EXCEPTION: main Process: com.kaaryanext.raghukaka, PID: 16825 java.lang.NoClassDefFoundError: com.squareup.picasso.Picasso$1 at com.squareup.picasso.Picasso.(Picasso.java:109) at com.kaaryanext.raghukaka.listadapters.HomePageListAdapter$RecyclerAdapter.onBindViewHolder(HomePageListAdapter.java:132)