我有一个Android库项目(由我写,有资料),我在Android项目中使用过-到目前为止,还不错,没有问题.但是在该库项目中,我引用了一个外部.jar文件(用于Bixolon移动打印机的SDK),它的构建很好,我可以在我的代码中引用该SDK的方法.但是在运行时我得到了:
02-16 09:44:43.620: W/dalvikvm(25402): VFY: unable to resolve virtual method 2433: Lcom/bixolon/android/library/BxlService;.GetStatus ()I
02-16 09:44:43.625: W/dalvikvm(25402): VFY: unable to resolve virtual method 2433: Lcom/bixolon/android/library/BxlService;.GetStatus ()I
02-16 09:44:43.625: W/dalvikvm(25402): VFY: unable to resolve virtual method 2436: Lcom/bixolon/android/library/BxlService;.MarkFeed (I)I
02-16 09:44:43.625: W/dalvikvm(25402): VFY: unable to resolve virtual method 2428: Lcom/bixolon/android/library/BxlService;.Directio ([BI[B[I)I
02-16 09:44:43.630: W/dalvikvm(25402): VFY: unable to resolve virtual method 2437: Lcom/bixolon/android/library/BxlService;.PrintImage (Ljava/lang/String;III)I
02-16 09:44:43.630: W/dalvikvm(25402): VFY: unable to resolve virtual method 2433: Lcom/bixolon/android/library/BxlService;.GetStatus ()I
02-16 09:44:43.630: W/dalvikvm(25402): VFY: unable to resolve virtual method 2433: Lcom/bixolon/android/library/BxlService;.GetStatus ()I
02-16 09:44:43.630: W/dalvikvm(25402): VFY: unable to resolve virtual method 2433: Lcom/bixolon/android/library/BxlService;.GetStatus ()I
02-16 09:44:43.790: W/dalvikvm(25402): threadid=1: thread exiting with uncaught exception (group=0x4001e578)
02-16 09:44:43.795: E/AndroidRuntime(25402): FATAL EXCEPTION: main
02-16 09:44:43.795: E/AndroidRuntime(25402): java.lang.NoClassDefFoundError: com.bixolon.android.library.BxlService
02-16 09:44:43.795: E/AndroidRuntime(25402): at de.softcon.mobileapp.framework.core.bluetooth.printer.bixolon.BixolonPrinter.connectToPrinter(BixolonPrinter.java:71)
02-16 09:44:43.795: E/AndroidRuntime(25402): at de.softcon.mobileapp.framework.core.bluetooth.printer.PrintManager.findPrinter(PrintManager.java:101)
02-16 09:44:43.795: E/AndroidRuntime(25402): at de.softcon.mobileapp.framework.core.bluetooth.printer.PrintManager.getPrinter(PrintManager.java:77)
02-16 09:44:43.795: E/AndroidRuntime(25402): at de.softcon.mobileapp.framework.core.bluetooth.printer.PrintManager.printTestReceipt(PrintManager.java:53)
02-16 09:44:43.795: E/AndroidRuntime(25402): at de.softcon.mobileoffences.ui.Printer$1.execute(Printer.java:40)
02-16 09:44:43.795: E/AndroidRuntime(25402): at de.softcon.mobileapp.framework.ui.Dialog.executeActions(Dialog.java:271)
02-16 09:44:43.795: E/AndroidRuntime(25402): at de.softcon.mobileapp.framework.ui.widgets.DynamicWidget.executeActions(DynamicWidget.java:152)
02-16 09:44:43.795: E/AndroidRuntime(25402): at de.softcon.mobileapp.framework.ui.widgets.DynamicWidget.executeActions(DynamicWidget.java:138)
02-16 09:44:43.795: E/AndroidRuntime(25402): at de.softcon.mobileapp.framework.ui.widgets.Button$1.onClick(Button.java:67)
02-16 09:44:43.795: E/AndroidRuntime(25402): at android.view.View.performClick(View.java:2538)
02-16 09:44:43.795: E/AndroidRuntime(25402): at android.view.View$PerformClick.run(View.java:9152)
02-16 09:44:43.795: E/AndroidRuntime(25402): at android.os.Handler.handleCallback(Handler.java:587)
02-16 09:44:43.795: E/AndroidRuntime(25402): at android.os.Handler.dispatchMessage(Handler.java:92)
02-16 09:44:43.795: E/AndroidRuntime(25402): at android.os.Looper.loop(Looper.java:130)
02-16 09:44:43.795: E/AndroidRuntime(25402): at android.app.ActivityThread.main(ActivityThread.java:3691)
02-16 09:44:43.795: E/AndroidRuntime(25402): at java.lang.reflect.Method.invokeNative(Native Method)
02-16 09:44:43.795: E/AndroidRuntime(25402): at java.lang.reflect.Method.invoke(Method.java:507)
02-16 09:44:43.795: E/AndroidRuntime(25402): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907)
02-16 09:44:43.795: E/AndroidRuntime(25402): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)
02-16 09:44:43.795: E/AndroidRuntime(25402): at dalvik.system.NativeStart.main(Native Method)
这让我想知道,是否正确部署了我在Android库项目中引用的.jar …我有一个来自Bixolon的示例项目,该项目直接包含其.jar文件(与我在我的Android库项目中引用的文件相同),并且它工作正常.我已经确保在我自己的Android项目和Android库项目(由Bixolon提供的示例项目中定义)中相同.因此,对于可能出现的问题,我现在有些茫然.不幸的是,我没有所引用的Bixolon SDK .jar的源文件-只有.jar.