我在我的 android 应用程序中使用 jodconverter 将 doc 文件转换为 pdf。当我包含包括unoil-3.0.1.jar在内的所有 jar 文件时,我得到“ Conversion to Dalvik format failed with error 1 ”。 但是,如果我删除 unoil-3.0.1.jar,则该错误将不存在。但它给出了运行时异常。这是我的日志:
05-28 07:00:49.360: D/CordovaLog(1380): calling converter
05-28 07:00:49.360: I/chromium(1380): [INFO:CONSOLE(44)] "calling converter", source: file:///android_asset/www/index.html (44)
05-28 07:00:51.580: D/PluginManager(1380): exec() call to unknown plugin: com.mindtree.native_phonegap.FileConverter
05-28 07:02:55.220: I/CordovaLog(1454): Changing log level to DEBUG(3)
05-28 07:02:55.270: I/CordovaLog(1454): Found preference for useBrowserHistory=true
05-28 07:02:55.270: D/CordovaLog(1454): Found preference for useBrowserHistory=true
05-28 07:02:55.270: I/CordovaLog(1454): Found preference for exit-on-suspend=false
05-28 07:02:55.270: D/CordovaLog(1454): Found preference for exit-on-suspend=false
05-28 07:02:55.270: D/DroidGap(1454): DroidGap.onCreate()
05-28 07:02:55.430: V/WebViewChromium(1454): Binding Chromium to the background looper Looper{b3d854a0}
05-28 07:02:55.470: I/chromium(1454): [INFO:library_loader_hooks.cc(112)] Chromium logging enabled: level = 0, default verbosity = 0
05-28 07:02:55.500: I/BrowserProcessMain(1454): Initializing chromium process, renderers=0
05-28 07:02:55.750: E/chromium(1454): [ERROR:gl_surface_egl.cc(153)] No suitable EGL configs found.
05-28 07:02:55.750: E/chromium(1454): [ERROR:gl_surface_egl.cc(620)] GLSurfaceEGL::InitializeOneOff failed.
05-28 07:02:55.750: E/chromium(1454): [ERROR:gl_surface_egl.cc(153)] No suitable EGL configs found.
05-28 07:02:55.750: E/chromium(1454): [ERROR:gl_surface_egl.cc(620)] GLSurfaceEGL::InitializeOneOff failed.
05-28 07:02:55.750: E/chromium(1454): [ERROR:gpu_info_collector.cc(86)] gfx::GLSurface::InitializeOneOff() failed
05-28 07:02:55.770: W/chromium(1454): [WARNING:proxy_service.cc(888)] PAC support disabled because there is no system implementation
05-28 07:02:55.890: D/dalvikvm(1454): GC_FOR_ALLOC freed 81K, 5% free 2888K/3040K, paused 32ms, total 33ms
05-28 07:02:55.890: I/dalvikvm-heap(1454): Grow heap (frag case) to 3.490MB for 635812-byte allocation
05-28 07:02:56.000: D/dalvikvm(1454): GC_FOR_ALLOC freed 1K, 5% free 3508K/3664K, paused 84ms, total 84ms
05-28 07:02:56.080: D/CordovaWebView(1454): CordovaWebView is running on device made by: unknown
05-28 07:02:56.100: D/JsMessageQueue(1454): Set native->JS mode to 2
05-28 07:02:56.110: D/DroidGap(1454): DroidGap.init()
05-28 07:02:56.130: D/CordovaWebView(1454): >>> loadUrl(file:///android_asset/www/index.html)
05-28 07:02:56.130: D/PluginManager(1454): init()
05-28 07:02:56.140: D/CordovaWebView(1454): >>> loadUrlNow()
05-28 07:02:56.290: D/DroidGap(1454): Resuming the App
05-28 07:02:56.350: D/SoftKeyboardDetect(1454): Ignore this event
05-28 07:02:56.430: D/gralloc_goldfish(1454): Emulator without GPU emulation detected.
05-28 07:02:56.590: D/SoftKeyboardDetect(1454): Ignore this event
05-28 07:02:57.170: D/DroidGap(1454): onMessage(onPageStarted,file:///android_asset/www/index.html)
05-28 07:02:58.740: E/AndroidProtocolHandler(1454): Unable to open asset URL: file:///android_asset/www/cordova_plugins.json
05-28 07:03:01.440: D/CordovaNetworkManager(1454): Connection Type: 3g
05-28 07:03:01.450: D/DroidGap(1454): onMessage(networkconnection,3g)
05-28 07:03:01.450: D/CordovaNetworkManager(1454): Connection Type: 3g
05-28 07:03:01.510: D/DroidGap(1454): onMessage(spinner,stop)
05-28 07:03:03.170: D/Cordova(1454): onPageFinished(file:///android_asset/www/index.html)
05-28 07:03:03.170: D/DroidGap(1454): onMessage(onPageFinished,file:///android_asset/www/index.html)
05-28 07:03:42.210: D/CordovaLog(1454): calling converter
05-28 07:03:42.210: I/chromium(1454): [INFO:CONSOLE(44)] "calling converter", source: file:///android_asset/www/index.html (44)
05-28 07:03:44.610: D/FileConverter Plugin(1454): in native fn
05-28 07:03:44.830: E/dalvikvm(1454): **Could not find class 'com.sun.star.frame.XComponentLoader', referenced from method com.artofsolving.jodconverter.openoffice.connection.AbstractOpenOfficeConnection.getDesktop**
05-28 07:03:44.830: W/dalvikvm(1454): VFY: unable to resolve check-cast 1010 (Lcom/sun/star/frame/XComponentLoader;) in Lcom/artofsolving/jodconverter/openoffice/connection/AbstractOpenOfficeConnection;
05-28 07:03:44.830: D/dalvikvm(1454): VFY: replacing opcode 0x1f at 0x0016
05-28 07:03:44.830: E/dalvikvm(1454): Could not find class 'com.sun.star.ucb.XFileIdentifierConverter', referenced from method com.artofsolving.jodconverter.openoffice.connection.AbstractOpenOfficeConnection.getFileContentProvider
05-28 07:03:44.830: W/dalvikvm(1454): VFY: unable to resolve check-cast 1318 (Lcom/sun/star/ucb/XFileIdentifierConverter;) in Lcom/artofsolving/jodconverter/openoffice/connection/AbstractOpenOfficeConnection;
05-28 07:03:44.830: D/dalvikvm(1454): VFY: replacing opcode 0x1f at 0x0016
05-28 07:03:44.850: I/dalvikvm(1454): DexOpt: access denied from Lorg/slf4j/LoggerFactory; to field Lorg/slf4j/impl/StaticLoggerBinder;.SINGLETON
05-28 07:03:44.850: W/dalvikvm(1454): VFY: unable to resolve static field 4488 (SINGLETON) in Lorg/slf4j/impl/StaticLoggerBinder;
05-28 07:03:44.850: D/dalvikvm(1454): VFY: replacing opcode 0x62 at 0x0006
05-28 07:03:44.850: I/dalvikvm(1454): DexOpt: access denied from Lorg/slf4j/LoggerFactory; to field Lorg/slf4j/impl/StaticLoggerBinder;.SINGLETON
05-28 07:03:44.850: W/dalvikvm(1454): VFY: unable to resolve static field 4488 (SINGLETON) in Lorg/slf4j/impl/StaticLoggerBinder;
05-28 07:03:44.850: D/dalvikvm(1454): VFY: replacing opcode 0x62 at 0x001d
05-28 07:03:45.120: W/System.err(1454): java.net.ConnectException: connection failed: socket,host=localhost,port=8100,tcpNoDelay=1: java.net.ConnectException: failed to connect to localhost/127.0.0.1 (port 8100): connect failed: ECONNREFUSED (Connection refused)
05-28 07:03:45.120: W/System.err(1454): at com.artofsolving.jodconverter.openoffice.connection.AbstractOpenOfficeConnection.connect(AbstractOpenOfficeConnection.java:79)
05-28 07:03:45.120: W/System.err(1454): at com.example.pdfexplorer.FileConverter.execute(FileConverter.java:33)
05-28 07:03:45.120: W/System.err(1454): at org.apache.cordova.api.CordovaPlugin.execute(CordovaPlugin.java:85)
05-28 07:03:45.130: W/System.err(1454): at org.apache.cordova.api.CordovaPlugin.execute(CordovaPlugin.java:66)
05-28 07:03:45.130: W/System.err(1454): at org.apache.cordova.api.PluginManager.exec(PluginManager.java:224)
05-28 07:03:45.130: W/System.err(1454): at org.apache.cordova.ExposedJsApi.exec(ExposedJsApi.java:51)
05-28 07:03:45.130: W/System.err(1454): at com.android.org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
05-28 07:03:45.130: W/System.err(1454): at com.android.org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:27)
05-28 07:03:45.130: W/System.err(1454): at android.os.Handler.dispatchMessage(Handler.java:102)
05-28 07:03:45.130: W/System.err(1454): at android.os.Looper.loop(Looper.java:137)
05-28 07:03:45.130: W/System.err(1454): at android.os.HandlerThread.run(HandlerThread.java:61)
05-28 07:03:45.150: W/dalvikvm(1454): VFY: unable to resolve exception class 1295 (Lcom/sun/star/task/ErrorCodeIOException;)
05-28 07:03:45.150: W/dalvikvm(1454): VFY: unable to find exception handler at addr 0xe
05-28 07:03:45.150: W/dalvikvm(1454): VFY: rejected Lcom/artofsolving/jodconverter/openoffice/converter/OpenOfficeDocumentConverter;.loadAndExport (Ljava/lang/String;Ljava/util/Map;Ljava/lang/String;Ljava/util/Map;)V
05-28 07:03:45.150: W/dalvikvm(1454): VFY: rejecting opcode 0x0d at 0x000e
05-28 07:03:45.150: W/dalvikvm(1454): VFY: rejected Lcom/artofsolving/jodconverter/openoffice/converter/OpenOfficeDocumentConverter;.loadAndExport (Ljava/lang/String;Ljava/util/Map;Ljava/lang/String;Ljava/util/Map;)V
05-28 07:03:45.150: W/dalvikvm(1454): Verifier rejected class Lcom/artofsolving/jodconverter/openoffice/converter/OpenOfficeDocumentConverter;
05-28 07:03:45.150: W/System.err(1454): java.lang.VerifyError: com/artofsolving/jodconverter/openoffice/converter/OpenOfficeDocumentConverter
05-28 07:03:45.160: W/System.err(1454): at com.example.pdfexplorer.FileConverter.execute(FileConverter.java:40)
05-28 07:03:45.170: W/System.err(1454): at org.apache.cordova.api.CordovaPlugin.execute(CordovaPlugin.java:85)
05-28 07:03:45.170: W/System.err(1454): at org.apache.cordova.api.CordovaPlugin.execute(CordovaPlugin.java:66)
05-28 07:03:45.170: W/System.err(1454): at org.apache.cordova.api.PluginManager.exec(PluginManager.java:224)
05-28 07:03:45.180: W/System.err(1454): at org.apache.cordova.ExposedJsApi.exec(ExposedJsApi.java:51)
05-28 07:03:45.180: W/System.err(1454): at com.android.org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
05-28 07:03:45.180: W/System.err(1454): at com.android.org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:27)
05-28 07:03:45.180: W/System.err(1454): at android.os.Handler.dispatchMessage(Handler.java:102)
05-28 07:03:45.190: W/System.err(1454): at android.os.Looper.loop(Looper.java:137)
05-28 07:03:45.190: W/System.err(1454): at android.os.HandlerThread.run(HandlerThread.java:61)
05-28 07:03:45.240: D/CordovaLog(1454): Uncaught Error: Error calling method on NPObject.
05-28 07:03:45.240: I/chromium(1454): [INFO:CONSOLE(857)] "Uncaught Error: Error calling method on NPObject.", source: file:///android_asset/www/cordova-2.7.0.js (857)
我搜索了那个 Dalvik 错误的所有链接,没有任何东西对我有用。有什么解决方法吗?任何帮助,将不胜感激。