Skip to content
This repository has been archived by the owner on Mar 17, 2022. It is now read-only.

no field with name='mNativeData' signature='J' in class Lcom/googlecode/tesseract/android/TessBaseAPI; #166

Closed
schrieveslaach opened this issue Aug 1, 2016 · 2 comments

Comments

@schrieveslaach
Copy link

I'm trying to create TessBaseAPI on a Nexus 7 with Cyanogenmod 11 (Android 4.4.4). When the constructor gets called I get an exception:

java.lang.NoSuchFieldError: no field with name='mNativeData' signature='J' in class Lcom/googlecode/tesseract/android/TessBaseAPI;
    at com.googlecode.tesseract.android.TessBaseAPI.nativeClassInit(Native Method)
    at com.googlecode.tesseract.android.TessBaseAPI.<clinit>(TessBaseAPI.java:48)

Do you have any ideas?

@schrieveslaach
Copy link
Author

OK, I found the issue. It was related to proguard. Maybe you can add an example proguard configuration file to the README.md. Here is mine:

-dontwarn com.googlecode.tesseract.**
-keep class com.googlecode.tesseract.** {
    *;
}

@rmtheis
Copy link
Owner

rmtheis commented Aug 2, 2016

There's already a Proguard config file but apparently your project setup didn't pick it up.

I want to see if using consumerProguardFiles instead of proguardFiles in the build.gradle for this project helps the situation. Needs investigation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants