I wrote a sample Android app. I am getting 'Tesseract(native): Could not 
initialize Tesseract API with language=eng!' error.

I did include 
'com.rmtheis:tess-two:5.4.0'
in the gradle file, my app manifest has 

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

also copied all 'data files' 3.04.00 version to 'tessdata' directory. I 
debugged Java portion of 'init' code it seems to be working fine, it's 
failing inside 'nativeside'. 

Any suggestions what could be going wrong with my code. Here are few lines 
of code I am using to init


final String lang = "eng"; TessBaseAPI baseApi = new TessBaseAPI(); File 
externalDir = 
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS); 
String externalDirPath = externalDir.getAbsolutePath() + "/"; flag = 
baseApi.init(externalDirPath, lang); 

I posted this on stackoverflow too (sorry if that's not a good practice)


-- 
You received this message because you are subscribed to the Google Groups 
"tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tesseract-ocr/e772b114-20be-4a7c-b95a-d831df656df6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to