gpt4 book ai didi

java - NoClassDefFoundError : com. squareup.picasso.Picasso 带电话

转载 作者:行者123 更新时间:2023-12-05 00:11:24 30 4
gpt4 key购买 nike

我在运行低于 API 版本 21 的手机上遇到 noClassDefFoundError。首先它与其他类一起出现,在删除所有可能的代码后,它开始与 Picasso 库一起出现。我附上了我的 logcat 和 build.gradle。

请帮助我,我被困住了,我尝试了很多解决方案,但没有一个有效。

我发现的类似问题是 - 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)

最佳答案

尝试下面的代码

public class MyApplication extends Application {

@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(base);
}
}

并在应用程序标签中的 android menifest 文件中添加以下行

android:name="your package name.MyApplication"

关于java - NoClassDefFoundError : com. squareup.picasso.Picasso 带电话,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36694726/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com