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

Initializing TessBaseAPI crashes app #246

Closed
Terry-Kusunoki-Martin opened this issue Jun 27, 2018 · 2 comments
Closed

Initializing TessBaseAPI crashes app #246

Terry-Kusunoki-Martin opened this issue Jun 27, 2018 · 2 comments

Comments

@Terry-Kusunoki-Martin
Copy link

Summary: I imported tess-two as a module for my project. However, the following block of code, specifically the final line, causes the app to crash.

        TessBaseAPI base_api = new TessBaseAPI();
        String DATA_PATH = "/storage/emulated/0/Download/eng.traineddata";
        String lang = "eng";
        base_api.init(DATA_PATH, lang);

Tess-two version: 9.0.0

Android version: 8.1

Phone/device model: ONEPLUS A3000

Link to training data used: https://github.com/tesseract-ocr/tessdata/blob/master/eng.traineddata

I'm not sure if it is the same as Issue #48, as I do not get an error message. The application merely crashes with the addition of this line. Do I need to create a folder in my phone's storage titled "tessdata"?

@rmtheis
Copy link
Owner

rmtheis commented Jul 2, 2018

Yes, and you also need to handle Runtime Permissions if your targetSdkVersion is 23+.

@rmtheis rmtheis closed this as completed Jul 2, 2018
@doduythao
Copy link

doduythao commented Jun 1, 2019

@Terry-Kusunoki-Martin I get terminated the same no log error. I tried to create sub folder and check to make sure it exists in the externaldirectory. I also granted permission of the app. Everything is ready but that's it. How did you solve it eventually ?

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

3 participants