错误加载。所以在Android 2.1真正的设备文件(的tesseract) [英] Error in loading .so file (Tesseract) on real device Android 2.1

查看:154
本文介绍了错误加载。所以在Android 2.1真正的设备文件(的tesseract)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的的tesseract 工具开发读卡样品扫描活动(OCR)。

I am developing a sample scan activity for card reading(OCR) using Tesseract tools.

它工作在模拟器罚款(采用Android 2.2),并从扫描速度快的SD卡,轻松地给出卡。
但是,当我尝试它真实设备或仿真器(采用了Android 2.1),它提供了以下错误:

It works fine on emulator (using android 2.2) and scans given card from sdcard fastly and easily. But when I try it on real device or emulator(Using android 2.1) it gives following error:

10-13 16:48:59.206: DEBUG/dalvikvm(3086): Trying to load lib /data/data/com.scan/lib/liblept.so 0x2fc14960
10-13 16:48:59.196: DEBUG/SntpClient(1814): request time failed: java.net.UnknownHostException: xtra1.gpsonextra.net
10-13 16:48:59.206: DEBUG/dalvikvm(3086): Trying to load lib /data/data/com.scan/lib/liblept.so 0x2fc14960
10-13 16:48:59.236: INFO/dalvikvm(3086): Unable to dlopen(/data/data/com.scan/lib/liblept.so): Cannot load library: link_image[1829]:  1137 could not load needed library 'libjpeg.so' for 'liblept.so' (load_library[1137]: Library 'libjpeg.so' not found)
10-13 16:48:59.236: WARN/dalvikvm(3086): Exception Ljava/lang/UnsatisfiedLinkError; thrown during Lcom/googlecode/tesseract/android/TessBaseAPI;.<clinit>
10-13 16:48:59.236: DEBUG/AndroidRuntime(3086): Shutting down VM
10-13 16:48:59.236: WARN/dalvikvm(3086): threadid=3: thread exiting with uncaught exception (group=0x2aaca450)
10-13 16:48:59.236: INFO/dalvikvm(3086): Unable to dlopen(/data/data/com.scan/lib/liblept.so): Cannot load library: link_image[1829]:  1137 could not load needed library 'libjpeg.so' for 'liblept.so' (load_library[1137]: Library 'libjpeg.so' not found)
10-13 16:48:59.236: WARN/dalvikvm(3086): Exception Ljava/lang/UnsatisfiedLinkError; thrown during Lcom/googlecode/tesseract/android/TessBaseAPI;.<clinit>
10-13 16:48:59.236: DEBUG/AndroidRuntime(3086): Shutting down VM
10-13 16:48:59.236: WARN/dalvikvm(3086): threadid=3: thread exiting with uncaught exception (group=0x2aaca450)
10-13 16:48:59.246: ERROR/AndroidRuntime(3086): Uncaught handler: thread main exiting due to uncaught exception
10-13 16:48:59.246: ERROR/AndroidRuntime(3086): Uncaught handler: thread main exiting due to uncaught exception
10-13 16:48:59.256: ERROR/AndroidRuntime(3086): java.lang.ExceptionInInitializerError
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     at com.scan.SAMPLE_SCANActivity.onCreate(SAMPLE_SCANActivity.java:37)
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     at android.app.ActivityThread.access$2200(ActivityThread.java:119)
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     at android.os.Handler.dispatchMessage(Handler.java:99)
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     at android.os.Looper.loop(Looper.java:123)
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     at android.app.ActivityThread.main(ActivityThread.java:4363)
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     at java.lang.reflect.Method.invokeNative(Native Method)
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     at java.lang.reflect.Method.invoke(Method.java:521)
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:877)
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:635)
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     at dalvik.system.NativeStart.main(Native Method)
10-13 16:48:59.256: ERROR/AndroidRuntime(3086): Caused by: java.lang.UnsatisfiedLinkError: Library lept not found
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     at java.lang.Runtime.loadLibrary(Runtime.java:489)
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     at java.lang.System.loadLibrary(System.java:557)
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     at com.googlecode.tesseract.android.TessBaseAPI.<clinit>(TessBaseAPI.java:42)
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     ... 14 more
10-13 16:48:59.256: ERROR/AndroidRuntime(3086): java.lang.ExceptionInInitializerError
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     at com.scan.SAMPLE_SCANActivity.onCreate(SAMPLE_SCANActivity.java:37)
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     at android.app.ActivityThread.access$2200(ActivityThread.java:119)
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     at android.os.Handler.dispatchMessage(Handler.java:99)
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     at android.os.Looper.loop(Looper.java:123)
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     at android.app.ActivityThread.main(ActivityThread.java:4363)
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     at java.lang.reflect.Method.invokeNative(Native Method)
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     at java.lang.reflect.Method.invoke(Method.java:521)
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:877)
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:635)
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     at dalvik.system.NativeStart.main(Native Method)
10-13 16:48:59.256: ERROR/AndroidRuntime(3086): Caused by: java.lang.UnsatisfiedLinkError: Library lept not found
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     at java.lang.Runtime.loadLibrary(Runtime.java:489)
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     at java.lang.System.loadLibrary(System.java:557)
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     at com.googlecode.tesseract.android.TessBaseAPI.<clinit>(TessBaseAPI.java:42)
10-13 16:48:59.256: ERROR/AndroidRuntime(3086):     ... 14 more

支持Android 2.1或这个库的其他任何问题???

Does this library works on android 2.1 or any other issue???

推荐答案

首先你读的所有步骤: -

First of all You read all steps:--

有关Windows或Ubuntu和构建Android 2.2的应用程序:

For Windows or Ubuntu and to build Android 2.2 app :


  1. 下载的NDK和放大器;的tesseract工具(SVN)的README项目

  1. downloaded the ndk & tesseract tools (svn) project with the README

建立它在Debian(VMware的)与NDK

build it on debian(vmware) with the ndk

的tesseract工具实际上是一个图书馆和一个有日食的.project只需要导入该项目建设后,所以与NDK,并建立它。

tesseract tools is actually a library and has a eclipse .project so just import that project after building the so's with ndk and build it.

将它作为LIB:<一href=\"http://developer.android.com/guide/developing/projects/projects-eclipse.html#SettingUpLibraryProject\" rel=\"nofollow\">http://developer.android.com/guide/developing/projects/projects-eclipse.html#SettingUpLibraryProject

现在在同一个工作区中创建一个新的Andr​​oid项目,即你的应用程序。转到属性,并从第3步引用库(http://developer.android.com/guide/developing/projects/projects-eclipse.html#ReferencingLibraryProject)

Now in the same workspace create a new android project i.e. your app. Go to properties and reference the library from step 3 (http://developer.android.com/guide/developing/projects/projects-eclipse.html#ReferencingLibraryProject)

6。构建您的应用程序基于Android 2.2(分):的http://$c$c.google.com/p/tesseract-android-tools/issues/detail?id=5#c16

所以这个库并不适用于Android 2.1

So This library does not works on android 2.1

这是否在图书馆工作的android 2.1 ???

Does this library works on android 2.1 ???.

这篇关于错误加载。所以在Android 2.1真正的设备文件(的tesseract)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆