gpt4 book ai didi

android - VFY : unable to find class referenced in signature

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:52:41 35 4
gpt4 key购买 nike

我有一个简单的 android 应用程序,它在其构建路径上使用了一个 modbus 库(“jamod”)。它在我运行时立即崩溃。我在这个问题上有基本相同的问题:Getting "Caused by: java.lang.VerifyError:"

但我无法真正解决问题。我的应用程序之前运行良好,现在无论我做什么似乎都不起作用。

下面是 logcat 输出。提前致谢。

08-09 14:36:47.753: W/dalvikvm(396): VFY: unable to find class referenced in signature (Lnet/wimpi/modbus/net/TCPMasterConnection;)
08-09 14:36:47.823: W/dalvikvm(396): VFY: unable to resolve exception class 510 (Lnet/wimpi/modbus/ModbusIOException;)
08-09 14:36:47.823: W/dalvikvm(396): VFY: unable to find exception handler at addr 0x18
08-09 14:36:47.854: W/dalvikvm(396): VFY: rejected Lcom/example/xmlparsertest/JavaModBusTcpDriver;.<init> (Ljava/lang/String;I)V
08-09 14:36:47.854: W/dalvikvm(396): VFY: rejecting opcode 0x0d at 0x0018
08-09 14:36:47.854: W/dalvikvm(396): VFY: rejected Lcom/example/xmlparsertest/JavaModBusTcpDriver;.<init> (Ljava/lang/String;I)V
08-09 14:36:47.854: W/dalvikvm(396): Verifier rejected class Lcom/example/xmlparsertest/JavaModBusTcpDriver;
08-09 14:36:47.854: D/AndroidRuntime(396): Shutting down VM
08-09 14:36:47.854: W/dalvikvm(396): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
08-09 14:36:47.873: E/AndroidRuntime(396): FATAL EXCEPTION: main
08-09 14:36:47.873: E/AndroidRuntime(396): java.lang.VerifyError: com.example.xmlparsertest.JavaModBusTcpDriver
08-09 14:36:47.873: E/AndroidRuntime(396): at com.example.xmlparsertest.MainActivity.<init>(MainActivity.java:13)
08-09 14:36:47.873: E/AndroidRuntime(396): at java.lang.Class.newInstanceImpl(Native Method)
08-09 14:36:47.873: E/AndroidRuntime(396): at java.lang.Class.newInstance(Class.java:1429)
08-09 14:36:47.873: E/AndroidRuntime(396): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
08-09 14:36:47.873: E/AndroidRuntime(396): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
08-09 14:36:47.873: E/AndroidRuntime(396): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
08-09 14:36:47.873: E/AndroidRuntime(396): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
08-09 14:36:47.873: E/AndroidRuntime(396): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
08-09 14:36:47.873: E/AndroidRuntime(396): at android.os.Handler.dispatchMessage(Handler.java:99)
08-09 14:36:47.873: E/AndroidRuntime(396): at android.os.Looper.loop(Looper.java:123)
08-09 14:36:47.873: E/AndroidRuntime(396): at android.app.ActivityThread.main(ActivityThread.java:4627)
08-09 14:36:47.873: E/AndroidRuntime(396): at java.lang.reflect.Method.invokeNative(Native Method)
08-09 14:36:47.873: E/AndroidRuntime(396): at java.lang.reflect.Method.invoke(Method.java:521)
08-09 14:36:47.873: E/AndroidRuntime(396): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
08-09 14:36:47.873: E/AndroidRuntime(396): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
08-09 14:36:47.873: E/AndroidRuntime(396): at dalvik.system.NativeStart.main(Native Method)

最佳答案

要仔细检查您正在做的一件事是在“构建路径”窗口的“订购和导出”选项卡中勾选了 jar 文件的复选框。这会将库包含在构建的 APK 中。

关于android - VFY : unable to find class referenced in signature,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11886240/

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