我有一个简单的 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)