I'm working on an android app that uses Tesseract4Android and followed the steps yet this error keeps occurring
I've made a folder "tesseract" in "sdcard/" and it contains "tessdata" with the *.traineddata files. Added install-time permission in the android manifest:
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
together with runtime permission request yet it doesnt recognize the traineddata files
This is in my MainActivity:
val tess = TessBaseAPI()
val dataPath = File("sdcard/", "tesseract").absolutePath
if (!tess.init(dataPath, "eng")) {
// Error initializing Tesseract (wrong data path or language)
tess.recycle();
return;
}
I also tried using all versions of the traineddata one by one and it still shows this error