Missing allheaders.h in Android Studio Project

前端 未结 5 1728
礼貌的吻别
礼貌的吻别 2021-01-14 02:56

I am following the tutorial from this tesseract tutorial and had everything go smoothly up until my actual running of the Java code. When I try

new TessBaseA         


        
5条回答
  •  庸人自扰
    2021-01-14 03:40

    Ppl, After struggling a day.. finally got the solution

    In build.gradle of tess-two module add the below code:

      sourceSets.main {
        manifest.srcFile 'src/main/AndroidManifest.xml'
        java.srcDirs = ['src/main/java']
        resources.srcDirs = ['src/main/java']
        res.srcDirs = ['src/main/res']
        jni.srcDirs = []
        jniLibs.srcDirs = ['src/main/jniLibs']
    }
    

    Main thing is please check manually weather all those file paths specified in above code exists in tess-two module!!

    Check in which path "liblept.so" and other ".so" files exist in tess-two library. For me it was inside /tesstwo/src/main/jniLibs/armeabi-v7a . Hence i have made jniLibs.srcDirs = ['src/main/jniLibs'] in above code. Hope it helps !!

提交回复
热议问题