我在调试 android OCR 应用程序时遇到此错误,
日志是:(您可以在最后几行看到错误)
12-27 16:18:01.050: D/TextLayoutCache(4953): Using debug level: 0 - Debug Enabled: 0
12-27 16:18:01.150: D/memalloc(4953): /dev/pmem: Mapped buffer base:0x5c266000 size:16297984 offset:12529664 fd:62
12-27 16:18:01.650: D/memalloc(4953): /dev/pmem: Mapped buffer base:0x5d2f1000 size:20066304 offset:16297984 fd:65
12-27 16:18:02.150: D/memalloc(4953): /dev/pmem: Mapped buffer base:0x5e614000 size:10739712 offset:6971392 fd:68
12-27 16:18:03.910: V/SimpleAndroidOCR.java(4953): Starting Camera app
12-27 16:18:04.310: D/memalloc(4953): /dev/pmem: Unmapping buffer base:0x5c266000 size:16297984 offset:12529664
12-27 16:18:04.310: D/memalloc(4953): /dev/pmem: Unmapping buffer base:0x5e614000 size:10739712 offset:6971392
12-27 16:18:04.320: D/memalloc(4953): /dev/pmem: Unmapping buffer base:0x5d2f1000 size:20066304 offset:16297984
12-27 16:18:05.230: W/IInputConnectionWrapper(4953): showStatusIcon on inactive InputConnection
12-27 16:18:15.730: I/SimpleAndroidOCR.java(4953): resultCode: -1
12-27 16:18:15.770: D/dalvikvm(4953): GC_FOR_ALLOC freed 67K, 7% free 12729K/13599K, paused 33ms
12-27 16:18:15.770: I/dalvikvm-heap(4953): Grow heap (frag case) to 15.359MB for 3000016-byte allocation
12-27 16:18:15.800: D/dalvikvm(4953): GC_FOR_ALLOC freed 4K, 6% free 15654K/16547K, paused 18ms
12-27 16:18:15.830: D/dalvikvm(4953): GC_CONCURRENT freed <1K, 6% free 15654K/16547K, paused 2ms+2ms
12-27 16:18:16.080: V/SimpleAndroidOCR.java(4953): Orient: 6
12-27 16:18:16.080: V/SimpleAndroidOCR.java(4953): Rotation: 90
12-27 16:18:16.100: D/dalvikvm(4953): GC_FOR_ALLOC freed 37K, 6% free 15629K/16547K, paused 20ms
12-27 16:18:16.110: I/dalvikvm-heap(4953): Grow heap (frag case) to 18.191MB for 3000016-byte allocation
12-27 16:18:16.180: D/dalvikvm(4953): GC_FOR_ALLOC freed <1K, 5% free 18559K/19491K, paused 56ms
12-27 16:18:16.240: D/dalvikvm(4953): GC_CONCURRENT freed 0K, 5% free 18559K/19491K, paused 2ms+2ms
12-27 16:18:16.270: D/dalvikvm(4953): GC_FOR_ALLOC freed 2930K, 20% free 15629K/19491K, paused 13ms
12-27 16:18:16.270: I/dalvikvm-heap(4953): Grow heap (frag case) to 18.191MB for 3000016-byte allocation
12-27 16:18:16.310: D/dalvikvm(4953): GC_FOR_ALLOC freed <1K, 5% free 18558K/19491K, paused 25ms
12-27 16:18:16.330: V/SimpleAndroidOCR.java(4953): Before baseApi
(THE ERROR STARTS HERE)
12-27 16:18:16.330: W/dalvikvm(4953): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/googlecode/tesseract/android/TessBaseAPI;
12-27 16:18:16.330: D/AndroidRuntime(4953): Shutting down VM
12-27 16:18:16.330: W/dalvikvm(4953): threadid=1: thread exiting with uncaught exception (group=0x40ab3210)
12-27 16:18:16.340: E/AndroidRuntime(4953): FATAL EXCEPTION: main
.java 文件:
Log.v(TAG, "Before baseApi");
// the error starts from here
TessBaseAPI baseApi = new TessBaseAPI();
baseApi.setDebug(true);
baseApi.init(DATA_PATH, lang);
baseApi.setImage(bitmap);
String recognizedText = baseApi.getUTF8Text();
baseApi.end();
// the next line is not exist in the log
Log.v(TAG, "OCRED TEXT: " + recognizedText);
如果你知道这个例外是什么,请告诉我....谢谢