当前位置: 首页 > 知识库问答 >
问题:

Android Studio中运行时.jar库的NoClassDefoundError

孙修贤
2023-03-14

库是正确的设置,没有错误报告的Gradle时,项目编译,我甚至可以使调试APK。但是,它在运行时尝试初始化SDK时抛出“java.lang.NoClassDefoundError”。

日志:

01-27 14:06:54.801  31166-31166/com.example.myapp I/dalvikvm﹕ Could not find method com.fiksu.asotracking.FiksuDeviceSettingsManager.getInstance, referenced from method com.fiksu.asotracking.FiksuTrackingManager.getClientId
01-27 14:06:54.801  31166-31166/com.example.myapp W/dalvikvm﹕ VFY: unable to resolve static method 13738: Lcom/fiksu/asotracking/FiksuDeviceSettingsManager;.getInstance ()Lcom/fiksu/asotracking/FiksuDeviceSettingsManager;
01-27 14:06:54.801  31166-31166/com.example.myapp D/dalvikvm﹕ VFY: replacing opcode 0x71 at 0x0000
01-27 14:06:54.806  31166-31166/com.example.myapp I/dalvikvm﹕ Could not find method com.fiksu.asotracking.FiksuConfigurationManager.getInstance, referenced from method com.fiksu.asotracking.FiksuTrackingManager.initialize
01-27 14:06:54.806  31166-31166/com.example.myapp W/dalvikvm﹕ VFY: unable to resolve static method 13733: Lcom/fiksu/asotracking/FiksuConfigurationManager;.getInstance ()Lcom/fiksu/asotracking/FiksuConfigurationManager;
01-27 14:06:54.806  31166-31166/com.example.myapp D/dalvikvm﹕ VFY: replacing opcode 0x71 at 0x000f
01-27 14:06:54.806  31166-31166/com.example.myapp I/dalvikvm﹕ Could not find method com.fiksu.asotracking.FiksuDeviceSettingsManager.getInstance, referenced from method com.fiksu.asotracking.FiksuTrackingManager.isAppTrackingEnabled
01-27 14:06:54.806  31166-31166/com.example.myapp W/dalvikvm﹕ VFY: unable to resolve static method 13738: Lcom/fiksu/asotracking/FiksuDeviceSettingsManager;.getInstance ()Lcom/fiksu/asotracking/FiksuDeviceSettingsManager;
01-27 14:06:54.806  31166-31166/com.example.myapp D/dalvikvm﹕ VFY: replacing opcode 0x71 at 0x0000
01-27 14:06:54.806  31166-31166/com.example.myapp I/dalvikvm﹕ Could not find method com.fiksu.asotracking.FiksuDeviceSettingsManager.getInstance, referenced from method com.fiksu.asotracking.FiksuTrackingManager.setAppTrackingEnabled
01-27 14:06:54.806  31166-31166/com.example.myapp W/dalvikvm﹕ VFY: unable to resolve static method 13738: Lcom/fiksu/asotracking/FiksuDeviceSettingsManager;.getInstance ()Lcom/fiksu/asotracking/FiksuDeviceSettingsManager;
01-27 14:06:54.806  31166-31166/com.example.myapp D/dalvikvm﹕ VFY: replacing opcode 0x71 at 0x0010
01-27 14:06:54.806  31166-31166/com.example.myapp I/dalvikvm﹕ Could not find method com.fiksu.asotracking.FiksuDeviceSettingsManager.getInstance, referenced from method com.fiksu.asotracking.FiksuTrackingManager.setClientId
01-27 14:06:54.806  31166-31166/com.example.myapp W/dalvikvm﹕ VFY: unable to resolve static method 13738: Lcom/fiksu/asotracking/FiksuDeviceSettingsManager;.getInstance ()Lcom/fiksu/asotracking/FiksuDeviceSettingsManager;
01-27 14:06:54.806  31166-31166/com.example.myapp D/dalvikvm﹕ VFY: replacing opcode 0x71 at 0x0010
01-27 14:06:54.806  31166-31166/com.example.myapp I/dalvikvm﹕ Could not find method com.fiksu.asotracking.FiksuConfigurationManager.getInstance, referenced from method com.fiksu.asotracking.FiksuTrackingManager.setDebugModeEnabled
01-27 14:06:54.806  31166-31166/com.example.myapp W/dalvikvm﹕ VFY: unable to resolve static method 13733: Lcom/fiksu/asotracking/FiksuConfigurationManager;.getInstance ()Lcom/fiksu/asotracking/FiksuConfigurationManager;
01-27 14:06:54.806  31166-31166/com.example.myapp D/dalvikvm﹕ VFY: replacing opcode 0x71 at 0x0001
01-27 14:06:54.806  31166-31166/com.example.myapp E/dalvikvm﹕ Could not find class 'com.fiksu.asotracking.CustomEventTracker', referenced from method com.fiksu.asotracking.FiksuTrackingManager.uploadCustomEvent
01-27 14:06:54.806  31166-31166/com.example.myapp W/dalvikvm﹕ VFY: unable to resolve new-instance 2112 (Lcom/fiksu/asotracking/CustomEventTracker;) in Lcom/fiksu/asotracking/FiksuTrackingManager;
01-27 14:06:54.806  31166-31166/com.example.myapp D/dalvikvm﹕ VFY: replacing opcode 0x22 at 0x000f
01-27 14:06:54.806  31166-31166/com.example.myapp E/dalvikvm﹕ Could not find class 'com.fiksu.asotracking.PurchaseEventTracker', referenced from method com.fiksu.asotracking.FiksuTrackingManager.uploadPurchase
01-27 14:06:54.806  31166-31166/com.example.myapp W/dalvikvm﹕ VFY: unable to resolve new-instance 2125 (Lcom/fiksu/asotracking/PurchaseEventTracker;) in Lcom/fiksu/asotracking/FiksuTrackingManager;
01-27 14:06:54.806  31166-31166/com.example.myapp D/dalvikvm﹕ VFY: replacing opcode 0x22 at 0x0022
01-27 14:06:54.806  31166-31166/com.example.myapp E/dalvikvm﹕ Could not find class 'com.fiksu.asotracking.PurchaseEventTracker', referenced from method com.fiksu.asotracking.FiksuTrackingManager.uploadPurchaseEvent
01-27 14:06:54.806  31166-31166/com.example.myapp W/dalvikvm﹕ VFY: unable to resolve new-instance 2125 (Lcom/fiksu/asotracking/PurchaseEventTracker;) in Lcom/fiksu/asotracking/FiksuTrackingManager;
01-27 14:06:54.806  31166-31166/com.example.myapp D/dalvikvm﹕ VFY: replacing opcode 0x22 at 0x0014
01-27 14:06:54.806  31166-31166/com.example.myapp E/dalvikvm﹕ Could not find class 'com.fiksu.asotracking.RegistrationEventTracker', referenced from method com.fiksu.asotracking.FiksuTrackingManager.uploadRegistration
01-27 14:06:54.806  31166-31166/com.example.myapp W/dalvikvm﹕ VFY: unable to resolve new-instance 2126 (Lcom/fiksu/asotracking/RegistrationEventTracker;) in Lcom/fiksu/asotracking/FiksuTrackingManager;
01-27 14:06:54.806  31166-31166/com.example.myapp D/dalvikvm﹕ VFY: replacing opcode 0x22 at 0x001e
01-27 14:06:54.806  31166-31166/com.example.myapp E/dalvikvm﹕ Could not find class 'com.fiksu.asotracking.RegistrationEventTracker', referenced from method com.fiksu.asotracking.FiksuTrackingManager.uploadRegistrationEvent
01-27 14:06:54.806  31166-31166/com.example.myapp W/dalvikvm﹕ VFY: unable to resolve new-instance 2126 (Lcom/fiksu/asotracking/RegistrationEventTracker;) in Lcom/fiksu/asotracking/FiksuTrackingManager;
01-27 14:06:54.806  31166-31166/com.example.myapp D/dalvikvm﹕ VFY: replacing opcode 0x22 at 0x0010
01-27 14:06:54.806  31166-31166/com.example.myapp D/dalvikvm﹕ DexOpt: unable to opt direct call 0x35ce at 0x2b in Lcom/fiksu/asotracking/FiksuTrackingManager;.initialize
01-27 14:06:54.806  31166-31166/com.example.myapp D/dalvikvm﹕ DexOpt: unable to opt direct call 0x35c5 at 0x2e in Lcom/fiksu/asotracking/FiksuTrackingManager;.initialize
01-27 14:06:54.811  31166-31166/com.example.myapp D/dalvikvm﹕ DexOpt: unable to opt direct call 0x359b at 0x15 in Lcom/fiksu/asotracking/FiksuTrackingManager;.uploadCustomEvent
01-27 14:06:54.811  31166-31166/com.example.myapp D/dalvikvm﹕ DexOpt: unable to opt direct call 0x35cf at 0x30 in Lcom/fiksu/asotracking/FiksuTrackingManager;.uploadPurchase
01-27 14:06:54.811  31166-31166/com.example.myapp D/dalvikvm﹕ DexOpt: unable to opt direct call 0x35cf at 0x23 in Lcom/fiksu/asotracking/FiksuTrackingManager;.uploadPurchaseEvent
01-27 14:06:54.811  31166-31166/com.example.myapp D/dalvikvm﹕ DexOpt: unable to opt direct call 0x35d1 at 0x26 in Lcom/fiksu/asotracking/FiksuTrackingManager;.uploadRegistration
01-27 14:06:54.811  31166-31166/com.example.myapp I/dalvikvm﹕ DexOpt: unable to optimize static field ref 0x1507 at 0x16 in Lcom/fiksu/asotracking/FiksuTrackingManager;.uploadRegistrationEvent
01-27 14:06:54.811  31166-31166/com.example.myapp D/dalvikvm﹕ DexOpt: unable to opt direct call 0x35d1 at 0x19 in Lcom/fiksu/asotracking/FiksuTrackingManager;.uploadRegistrationEvent
01-27 14:06:54.811  31166-31166/com.example.myapp D/AndroidRuntime﹕ Shutting down VM
01-27 14:06:54.811  31166-31166/com.example.myapp W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41ecb700)
01-27 14:06:54.821  31166-31166/com.example.myapp E/AndroidRuntime﹕ FATAL EXCEPTION: main
    java.lang.NoClassDefFoundError: com.fiksu.asotracking.FiksuConfigurationManager
            at com.fiksu.asotracking.FiksuTrackingManager.initialize(FiksuTrackingManager.java:83)
            at com.example.userinterface.MyApplication.onCreate(MyApplication.java:56)
            at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1024)
            at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4684)
            at android.app.ActivityThread.access$1400(ActivityThread.java:159)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1376)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:5419)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:525)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1187)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
            at dalvik.system.NativeStart.main(Native Method)

我的本地环境:

    null
    null

Android studio Gradle找不到method compile()

获取“由:java.lang.VerifyError:”

在Android库文件中找不到类

共有1个答案

伊富
2023-03-14

新发现

我的GS4(Android 4.3)不能运行这个应用程序,但HTC One M8(Android 5.0.1)可以运行

根本原因

    null
dexOptions {
    incremental true
    javaMaxHeapSize "4g"
}
 类似资料:
  • 您能帮助在android studio中运行默认java而不是gradle执行吗?谢谢

  • 附上一个拉链,里面有三个文件夹。Shmer示例,ShimimDriver和ShimimroidInstrumentDriver。Shimime示例是主程序,并依赖于其他两个项目作为库。 我启动AndroidStudio 1.1并将“ShimmerExample”作为eclipse项目导入。导入摘要。txt在下面。 该项目构建良好,并加载到android设备上。启动应用程序后,我得到该类位于vecm

  • 现在,当我运行和时,一切都很好,但是当我尝试运行项目时(在build/libs/中运行构建的jar和在IntelliJ中运行velotest类时也是如此),我会得到以下错误: 线程“main”java.lang.noClassDefFounderror:org/apache/commons/collections/extendedProperties 在org.apache.velocity.ru

  • 当我运行访问目录中其他文件的jar文件时,我得到以下: 线程“main”java.nio.file.nosuchfileException异常:src\filetobeaccessed.txt.lck在sun.nio.fs.windowsException.translateToioException(未知源)在sun.nio.fs.windowsException.reshrowasioExce

  • 问题内容: 我在应用程序中有两个主要课程。当我将其打包到一个可运行的jar(使用Eclipse导出功能)时,我必须选择一个默认的主类。 有没有一种方法可以在运行时从jar访问非默认主类? 问题答案: 您可以通过和访问。jar中的默认主类用于通过调用应用程序时。 有关更多详细信息,请参见JAR_(file_format)。在Eclipse中选择主类时,将在其中进行设置:jar文件清单中jar清单的内