JNI GetMethodID被调用挂起异常' java.lang.NoSuchFieldError'

时间:2016-03-08 03:41:32

标签: android android-ndk java-native-interface ocr

我正在尝试将OCR库添加到我的项目中,但我发现没有arm64-v8a库(.SO)文件,所以我下载了OCR JNI代码,由android-ndk-r10e编译。 然后我将库添加到我的演示并运行,发生错误:

03-08 11:21:11.110: D/SurfaceView(22005): checkSurfaceViewlLogProperty get invalid command
03-08 11:21:11.232: A/art(22005): art/runtime/check_jni.cc:70] JNI DETECTED ERROR IN APPLICATION: JNI GetMethodID called with pending exception 'java.lang.NoSuchFieldError' thrown in void com.googlecode.tesseract.android.TessBaseAPI.nativeClassInit():-2
03-08 11:21:11.232: A/art(22005): art/runtime/check_jni.cc:70]     in call to GetMethodID
03-08 11:21:11.232: A/art(22005): art/runtime/check_jni.cc:70]     from void com.googlecode.tesseract.android.TessBaseAPI.nativeClassInit()
03-08 11:21:11.232: A/art(22005): art/runtime/check_jni.cc:70] "main" prio=5 tid=1 Runnable
03-08 11:21:11.232: A/art(22005): art/runtime/check_jni.cc:70]   | group="main" sCount=0 dsCount=0 obj=0x74d11fb8 self=0x7fa1c9a000
03-08 11:21:11.232: A/art(22005): art/runtime/check_jni.cc:70]   | sysTid=22005 nice=0 cgrp=default sched=0/0 handle=0x7fa5dc3eb0
03-08 11:21:11.232: A/art(22005): art/runtime/check_jni.cc:70]   | state=R schedstat=( 1008955538 228340763 1201 ) utm=87 stm=13 core=0 HZ=100
03-08 11:21:11.232: A/art(22005): art/runtime/check_jni.cc:70]   | stack=0x7fcd5b3000-0x7fcd5b5000 stackSize=8MB
03-08 11:21:11.232: A/art(22005): art/runtime/check_jni.cc:70]   | held mutexes= "mutator lock"(shared held)
03-08 11:21:11.232: A/art(22005): art/runtime/check_jni.cc:70]   at com.googlecode.tesseract.android.TessBaseAPI.nativeClassInit(Native method)

任何人都可以帮助我吗?

提前致谢。

0 个答案:

没有答案