Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boolean okDict = checkDict(dir.getAbsolutePath()) #63

Open
WWY2016 opened this issue Oct 10, 2022 · 4 comments
Open

boolean okDict = checkDict(dir.getAbsolutePath()) #63

WWY2016 opened this issue Oct 10, 2022 · 4 comments

Comments

@WWY2016
Copy link

WWY2016 commented Oct 10, 2022

// step2: 检测字典是否正确
boolean okDict = checkDict(dir.getAbsolutePath());
这里 打断点成功失败, 不打断点 失败,有遇到过吗

@shouzhong
Copy link
Owner

是的,这个so包不稳定,在有些手机上可以,有些不可以,我建议可以和另一个搭配使用

@lsCoding666
Copy link

很神奇 我也遇到了。如果在这里打断点就成功,不打断点就失败

@lsCoding666
Copy link

解决了 可以试下 像这样写 失败了的话在新线程里再init

 private static final boolean checkDict(final String path) {

        final byte[] bytes = path.getBytes();
        Log.e("bytes",String.valueOf(bytes.length));
        Log.e("path",path);
         int code = EXOCREngine.nativeInit(bytes);
        Log.e("kalu", "checkDict ==> code = " + code);
        if(code!=0){
            new Thread(){
                @Override
                public void run() {
                    EXOCRDict.checkDict(path);
                }
            }.start();
        }
        return true;

    }

@lsCoding666
Copy link

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

No branches or pull requests

3 participants