Tesseract在某些Android设备中提供NoSuchFieldException

时间:2016-03-01 17:55:50

标签: android tesseract

我的Android应用程序使用Tesseract版本3.0.1,目前该应用程序在大多数设备上正常工作除了一些三星设备,特别是那些运行Android Lollipop的设备。

正在发生的例外是:

   java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:300)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)

Caused by: java.lang.NoSuchFieldError: no "J" field "mNativeData" in class "Lcom/googlecode/tesseract/android/TessBaseAPI;" or its superclasses
at com.googlecode.tesseract.android.TessBaseAPI.nativeClassInit(Native Method)
at com.googlecode.tesseract.android.TessBaseAPI.<clinit>(Unknown Source)
at aj.colorise.g.a(Unknown Source)
at aj.colorise.p.a(Unknown Source)
at aj.colorise.p.doInBackground(Unknown Source)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
... 4 more

这是为什么? 我已将ProGuard配置为不包括Tesseract项目,并制作了包含以下内容的规则文件:

  -dontoptimize
  -dontobfuscate
  -dontpreverify
  -dontshrink
  -dontskipnonpubliclibraryclasses
  -dontskipnonpubliclibraryclassmembers
  -dontusemixedcaseclassnames
  -dontnote

0 个答案:

没有答案