2

I created a project named NDKTest3, then created a folder named jni inside the root of the project and put these 3 files inside it:

Android.mk:

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := ndktest3
LOCAL_SRC_FILES := test.c
include $(BUILD_SHARED_LIBRARY)
include $(LOCAL_PATH)/../tesseract/android/jni/Android.mk

Application.mk:

APP_ABI := all

test.c:

(blank)

I also edited my `build.gradle(app) as below:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "com.m.ndktest3"
        minSdkVersion 21
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

        ndk{
            moduleName "ndktest3"
        }
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    externalNativeBuild{
        ndkBuild{
            path '../jni/Android.mk'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}

settings.gradle:

include ':app'
include ':tesseract'

Then I copied the tesseract folder inside the root of my project. You can see my project below:

enter image description here

But when I want to sync the project it gives me this error message:

External Native Build Issues
Build command failed.
Error while executing process /home/m/Android/Sdk/ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/home/m/AndroidStudioProjects/NDKTest3/jni/Android.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=1 APP_PLATFORM=android-21 NDK_OUT=/home/m/AndroidStudioProjects/NDKTest3/app/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=/home/m/AndroidStudioProjects/NDKTest3/app/build/intermediates/ndkBuild/debug/lib APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
local c includes= /home/m/AndroidStudioProjects/NDKTest3/jni/../tesseract/android/jni/../../api /home/m/AndroidStudioProjects/NDKTest3/jni/../tesseract/android/jni/../../ccmain /home/m/AndroidStudioProjects/NDKTest3/jni/../tesseract/android/jni/../../ccstruct /home/m/AndroidStudioProjects/NDKTest3/jni/../tesseract/android/jni/../../ccutil /home/m/AndroidStudioProjects/NDKTest3/jni/../tesseract/android/jni/../../classify /home/m/AndroidStudioProjects/NDKTest3/jni/../tesseract/android/jni/../../cutil /home/m/AndroidStudioProjects/NDKTest3/jni/../tesseract/android/jni/../../dict /home/m/AndroidStudioProjects/NDKTest3/jni/../tesseract/android/jni/../../image /home/m/AndroidStudioProjects/NDKTest3/jni/../tesseract/android/jni/../../textord /home/m/AndroidStudioProjects/NDKTest3/jni/../tesseract/android/jni/../../third_party /home/m/AndroidStudioProjects/NDKTest3/jni/../tesseract/android/jni/../../wordrec /home/m/AndroidStudioProjects/NDKTest3/jni/../tesseract/android/jni/../../opencl /home/m/AndroidStudioProjects/NDKTest3/jni/../tesseract/android/jni/../../viewer /home/m/AndroidStudioProjects/NDKTest3/jni/../tesseract/android/jni/../../../leptonica/include
local path=/home/m/AndroidStudioProjects/NDKTest3/jni/../tesseract/android/jni
local src files  = ../../api/baseapi.cpp ../../api/capi.cpp ../../api/renderer.cpp ../../ccmain/adaptions.cpp ../../ccmain/applybox.cpp ../../ccmain/control.cpp ../../ccmain/docqual.cpp ../../ccmain/equationdetect.cpp ../../ccmain/fixspace.cpp ../../ccmain/fixxht.cpp ../../ccmain/linerec.cpp ../../ccmain/ltrresultiterator.cpp ../../ccmain/osdetect.cpp ../../ccmain/output.cpp ../../ccmain/pageiterator.cpp ../../ccmain/pagesegmain.cpp ../../ccmain/pagewalk.cpp ../../ccmain/paragraphs.cpp ../../ccmain/paramsd.cpp ../../ccmain/par_control.cpp ../../ccmain/pgedit.cpp ../../ccmain/recogtraining.cpp ../../ccmain/reject.cpp ../../ccmain/resultiterator.cpp ../../ccmain/superscript.cpp ../../ccmain/tessbox.cpp ../../ccmain/tessedit.cpp ../../ccmain/tesseractclass.cpp ../../ccmain/tessvars.cpp ../../ccmain/tfacepp.cpp ../../ccmain/thresholder.cpp ../../ccmain/werdit.cpp ../../ccstruct/blamer.cpp ../../ccstruct/blobbox.cpp ../../ccstruct/blobs.cpp ../../ccstruct/blread.cpp ../../ccstruct/boxread.cpp ../../ccstruct/boxword./home/m/AndroidStudioProjects/NDKTest3/jni/../tesseract/android/jni/Android.mk:48: *cp** Android NDK:p  Aborting.   .. .  Stop.
/../ccstruct/ccstruct.cpp ../../ccstruct/coutln.cpp ../../ccstruct/detlinefit.cpp ../../ccstruct/dppoint.cpp ../../ccstruct/fontinfo.cpp ../../ccstruct/genblob.cpp ../../ccstruct/imagedata.cpp ../../ccstruct/linlsq.cpp ../../ccstruct/matrix.cpp ../../ccstruct/mod128.cpp ../../ccstruct/normalis.cpp ../../ccstruct/ocrblock.cpp ../../ccstruct/ocrpara.cpp ../../ccstruct/ocrrow.cpp ../../ccstruct/otsuthr.cpp ../../ccstruct/pageres.cpp ../../ccstruct/params_training_featdef.cpp ../../ccstruct/pdblock.cpp ../../ccstruct/points.cpp ../../ccstruct/polyaprx.cpp ../../ccstruct/polyblk.cpp ../../ccstruct/publictypes.cpp ../../ccstruct/quadlsq.cpp ../../ccstruct/quspline.cpp ../../ccstruct/ratngs.cpp ../../ccstruct/rect.cpp ../../ccstruct/rejctmap.cpp ../../ccstruct/seam.cpp ../../ccstruct/split.cpp ../../ccstruct/statistc.cpp ../../ccstruct/stepblob.cpp ../../ccstruct/vecfuncs.cpp ../../ccstruct/werd.cpp ../../ccutil/ambigs.cpp ../../ccutil/basedir.cpp ../../ccutil/bits16.cpp ../../ccutil/bitvector.cpp ../../ccutil/ccutil.cpp ../../ccutil/clst.cpp ../../ccutil/elst2.cpp ../../ccutil/elst.cpp ../../ccutil/errcode.cpp ../../ccutil/globaloc.cpp ../../ccutil/indexmapbidi.cpp ../../ccutil/mainblk.cpp ../../ccutil/memry.cpp ../../ccutil/params.cpp ../../ccutil/scanutils.cpp ../../ccutil/serialis.cpp ../../ccutil/strngs.cpp ../../ccutil/tessdatamanager.cpp ../../ccutil/tprintf.cpp ../../ccutil/unicharcompress.cpp ../../ccutil/unichar.cpp ../../ccutil/unicharmap.cpp ../../ccutil/unicharset.cpp ../../ccutil/unicodes.cpp ../../ccutil/universalambigs.cpp ../../classify/adaptive.cpp ../../classify/adaptmatch.cpp ../../classify/blobclass.cpp ../../classify/classify.cpp ../../classify/cluster.cpp ../../classify/clusttool.cpp ../../classify/cutoffs.cpp ../../classify/errorcounter.cpp ../../classify/featdefs.cpp ../../classify/float2int.cpp ../../classify/fpoint.cpp ../../classify/intfeaturedist.cpp ../../classify/intfeaturemap.cpp ../../classify/intfeaturespace.cpp ../../classify/intfx.cpp ../../classify/intmatcher.cpp ../../classify/intproto.cpp ../../classify/kdtree.cpp ../../classify/mastertrainer.cpp ../../classify/mf.cpp ../../classify/mfdefs.cpp ../../classify/mfoutline.cpp ../../classify/mfx.cpp ../../classify/normfeat.cpp ../../classify/normmatch.cpp ../../classify/ocrfeatures.cpp ../../classify/outfeat.cpp ../../classify/picofeat.cpp ../../classify/protos.cpp ../../classify/sampleiterator.cpp ../../classify/shapeclassifier.cpp ../../classify/shapetable.cpp ../../classify/tessclassifier.cpp ../../classify/trainingsample.cpp ../../classify/trainingsampleset.cpp ../../cutil/bitvec.cpp ../../cutil/callcpp.cpp ../../cutil/cutil_class.cpp ../../cutil/cutil.cpp ../../cutil/danerror.cpp ../../cutil/efio.cpp ../../cutil/emalloc.cpp ../../cutil/oldlist.cpp ../../cutil/structures.cpp ../../dict/context.cpp ../../dict/dawg_cache.cpp ../../dict/dawg.cpp ../../dict/dict.cpp ../../dict/hyphen.cpp ../../dict/permdawg.cpp ../../dict/stopper.cpp ../../dict/trie.cpp ../../textord/alignedblob.cpp ../../textord/baselinedetect.cpp ../../textord/bbgrid.cpp ../../textord/blkocc.cpp ../../textord/blobgrid.cpp ../../textord/ccnontextdetect.cpp ../../textord/cjkpitch.cpp ../../textord/colfind.cpp ../../textord/colpartition.cpp ../../textord/colpartitiongrid.cpp ../../textord/colpartitionset.cpp ../../textord/devanagari_processing.cpp ../../textord/drawedg.cpp ../../textord/drawtord.cpp ../../textord/edgblob.cpp ../../textord/edgloop.cpp ../../textord/equationdetectbase.cpp ../../textord/fpchop.cpp ../../textord/gap_map.cpp ../../textord/imagefind.cpp ../../textord/linefind.cpp ../../textord/makerow.cpp ../../textord/oldbasel.cpp ../../textord/pithsync.cpp ../../textord/pitsync1.cpp ../../textord/scanedg.cpp ../../textord/sortflts.cpp ../../textord/strokewidth.cpp ../../textord/tabfind.cpp ../../textord/tablefind.cpp ../../textord/tablerecog.cpp ../../textord/tabvector.cpp ../../textord/textlineprojection.cpp ../../textord/textord.cpp ../../textord/topitch.cpp ../../textord/tordmain.cpp ../../textord/tospace.cpp ../../textord/tovars.cpp ../../textord/underlin.cpp ../../textord/wordseg.cpp ../../textord/workingpartset.cpp ../../viewer/scrollview.cpp ../../viewer/svmnode.cpp ../../viewer/svpaint.cpp ../../viewer/svutil.cpp ../../wordrec/associate.cpp ../../wordrec/chop.cpp ../../wordrec/chopper.cpp ../../wordrec/drawfx.cpp ../../wordrec/findseam.cpp ../../wordrec/gradechop.cpp ../../wordrec/language_model.cpp ../../wordrec/lm_consistency.cpp ../../wordrec/lm_pain_points.cpp ../../wordrec/lm_state.cpp ../../wordrec/outlines.cpp ../../wordrec/params_model.cpp ../../wordrec/pieces.cpp ../../wordrec/plotedges.cpp ../../wordrec/render.cpp ../../wordrec/segsearch.cpp ../../wordrec/tface.cpp ../../wordrec/wordclass.cpp ../../wordrec/wordrec.cpp
Android NDK: /home/m/AndroidStudioProjects/NDKTest3/jni/../tesseract/android/jni/Android.mk: Cannot find module with tag 'base/port' in import path    
Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?    
Android NDK: The following directories were searched:    
Android NDK:         
Build command failed.
Error while executing process /home/m/Android/Sdk/ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/home/m/AndroidStudioProjects/NDKTest3/jni/Android.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=0 APP_PLATFORM=android-21 NDK_OUT=/home/m/AndroidStudioProjects/NDKTest3/app/build/intermediates/ndkBuild/release/obj NDK_LIBS_OUT=/home/m/AndroidStudioProjects/NDKTest3/app/build/intermediates/ndkBuild/release/lib APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
local c includes= /home/m/AndroidStudioProjects/NDKTest3/jni/../tesseract/android/jni/../../api /home/m/AndroidStudioProjects/NDKTest3/jni/../tesseract/android/jni/../../ccmain /home/m/AndroidStudioProjects/NDKTest3/jni/../tesseract/android/jni/../../ccstruct /home/m/AndroidStudioProjects/NDKTest3/jni/../tesseract/android/jni/../../ccutil /home/m/AndroidStudioProjects/NDKTest3/jni/../tesseract/android/jni/../../classify /home/m/AndroidStudioProjects/NDKTest3/jni/../tesseract/android/jni/../../cutil /home/m/AndroidStudioProjects/NDKTest3/jni/../tesseract/android/jni/../../dict /home/m/AndroidStudioProjects/NDKTest3/jni/../tesseract/android/jni/../../image /home/m/AndroidStudioProjects/NDKTest3/jni/../tesseract/android/jni/../../textord /home/m/AndroidStudioProjects/NDKTest3/jni/../tesseract/android/jni/../../third_party /home/m/AndroidStudioProjects/NDKTest3/jni/../tesseract/android/jni/../../wordrec /home/m/AndroidStudioProjects/NDKTest3/jni/../tesseract/android/jni/../../opencl /home/m/AndroidStudioProjects/NDKTest3/jni/../tesseract/android/jni/../../viewer /home/m/AndroidStudioProjects/NDKTest3/jni/../tesseract/android/jni/../../../leptonica/include
local path=/home/m/AndroidStudioProjects/NDKTest3/jni/../tesseract/android/jni
local src files  = ../../api/baseapi.cpp ../../api/capi.cpp ../../api/renderer.cpp ../../ccmain/adaptions.cpp ../../ccmain/applybox.cpp ../../ccmain/control.cpp ../../ccmain/docqual.cpp ../../ccmain/equationdetect.cpp ../../ccmain/fixspace.cpp ../../ccmain/fixxht.cpp ../../ccmain/linerec.cpp ../../ccmain/ltrresultiterator.cpp ../../ccmain/osdetect.cpp ../../ccmain/output.cpp ../../ccmain/pageiterator.cpp ../../ccmain/pagesegmain.cpp ../../ccmain/pagewalk.cpp ../../ccmain/paragraphs.cpp ../../ccmain/paramsd.cpp ../../ccmain/par_control.cpp ../../ccmain/pgedit.cpp ../../ccmain/recogtraining.cpp ../../ccmain/reject.cpp ../../ccmain/resultiterator.cpp ../../ccmain/superscript.cpp ../../ccmain/tessbox.cpp ../../ccmain/tessedit.cpp ../../ccmain/tesseractclass.cpp ../../ccmain/tessvars.cpp ../../ccmain/tfacepp.cpp ../../ccmain/thresholder.cpp ../../ccmain/werdit.cpp ../../ccstruct/blamer.cpp ../../ccstruc/home/m/AndroidStudioProjects/NDKTest3/jni/../tesseract/android/jni/Android.mk:48: *** Android NDK: Aborting.    .  Stop.
t/blobbox.cpp ../../ccstruct/blobs.cpp ../../ccstruct/blread.cpp ../../ccstruct/boxread.cpp ../../ccstruct/boxword.cpp ../../ccstruct/ccstruct.cpp ../../ccstruct/coutln.cpp ../../ccstruct/detlinefit.cpp ../../ccstruct/dppoint.cpp ../../ccstruct/fontinfo.cpp ../../ccstruct/genblob.cpp ../../ccstruct/imagedata.cpp ../../ccstruct/linlsq.cpp ../../ccstruct/matrix.cpp ../../ccstruct/mod128.cpp ../../ccstruct/normalis.cpp ../../ccstruct/ocrblock.cpp ../../ccstruct/ocrpara.cpp ../../ccstruct/ocrrow.cpp ../../ccstruct/otsuthr.cpp ../../ccstruct/pageres.cpp ../../ccstruct/params_training_featdef.cpp ../../ccstruct/pdblock.cpp ../../ccstruct/points.cpp ../../ccstruct/polyaprx.cpp ../../ccstruct/polyblk.cpp ../../ccstruct/publictypes.cpp ../../ccstruct/quadlsq.cpp ../../ccstruct/quspline.cpp ../../ccstruct/ratngs.cpp ../../ccstruct/rect.cpp ../../ccstruct/rejctmap.cpp ../../ccstruct/seam.cpp ../../ccstruct/split.cpp ../../ccstruct/statistc.cpp ../../ccstruct/stepblob.cpp ../../ccstruct/vecfuncs.cpp ../../ccstruct/werd.cpp ../../ccutil/ambigs.cpp ../../ccutil/basedir.cpp ../../ccutil/bits16.cpp ../../ccutil/bitvector.cpp ../../ccutil/ccutil.cpp ../../ccutil/clst.cpp ../../ccutil/elst2.cpp ../../ccutil/elst.cpp ../../ccutil/errcode.cpp ../../ccutil/globaloc.cpp ../../ccutil/indexmapbidi.cpp ../../ccutil/mainblk.cpp ../../ccutil/memry.cpp ../../ccutil/params.cpp ../../ccutil/scanutils.cpp ../../ccutil/serialis.cpp ../../ccutil/strngs.cpp ../../ccutil/tessdatamanager.cpp ../../ccutil/tprintf.cpp ../../ccutil/unicharcompress.cpp ../../ccutil/unichar.cpp ../../ccutil/unicharmap.cpp ../../ccutil/unicharset.cpp ../../ccutil/unicodes.cpp ../../ccutil/universalambigs.cpp ../../classify/adaptive.cpp ../../classify/adaptmatch.cpp ../../classify/blobclass.cpp ../../classify/classify.cpp ../../classify/cluster.cpp ../../classify/clusttool.cpp ../../classify/cutoffs.cpp ../../classify/errorcounter.cpp ../../classify/featdefs.cpp ../../classify/float2int.cpp ../../classify/fpoint.cpp ../../classify/intfeaturedist.cpp ../../classify/intfeaturemap.cpp ../../classify/intfeaturespace.cpp ../../classify/intfx.cpp ../../classify/intmatcher.cpp ../../classify/intproto.cpp ../../classify/kdtree.cpp ../../classify/mastertrainer.cpp ../../classify/mf.cpp ../../classify/mfdefs.cpp ../../classify/mfoutline.cpp ../../classify/mfx.cpp ../../classify/normfeat.cpp ../../classify/normmatch.cpp ../../classify/ocrfeatures.cpp ../../classify/outfeat.cpp ../../classify/picofeat.cpp ../../classify/protos.cpp ../../classify/sampleiterator.cpp ../../classify/shapeclassifier.cpp ../../classify/shapetable.cpp ../../classify/tessclassifier.cpp ../../classify/trainingsample.cpp ../../classify/trainingsampleset.cpp ../../cutil/bitvec.cpp ../../cutil/callcpp.cpp ../../cutil/cutil_class.cpp ../../cutil/cutil.cpp ../../cutil/danerror.cpp ../../cutil/efio.cpp ../../cutil/emalloc.cpp ../../cutil/oldlist.cpp ../../cutil/structures.cpp ../../dict/context.cpp ../../dict/dawg_cache.cpp ../../dict/dawg.cpp ../../dict/dict.cpp ../../dict/hyphen.cpp ../../dict/permdawg.cpp ../../dict/stopper.cpp ../../dict/trie.cpp ../../textord/alignedblob.cpp ../../textord/baselinedetect.cpp ../../textord/bbgrid.cpp ../../textord/blkocc.cpp ../../textord/blobgrid.cpp ../../textord/ccnontextdetect.cpp ../../textord/cjkpitch.cpp ../../textord/colfind.cpp ../../textord/colpartition.cpp ../../textord/colpartitiongrid.cpp ../../textord/colpartitionset.cpp ../../textord/devanagari_processing.cpp ../../textord/drawedg.cpp ../../textord/drawtord.cpp ../../textord/edgblob.cpp ../../textord/edgloop.cpp ../../textord/equationdetectbase.cpp ../../textord/fpchop.cpp ../../textord/gap_map.cpp ../../textord/imagefind.cpp ../../textord/linefind.cpp ../../textord/makerow.cpp ../../textord/oldbasel.cpp ../../textord/pithsync.cpp ../../textord/pitsync1.cpp ../../textord/scanedg.cpp ../../textord/sortflts.cpp ../../textord/strokewidth.cpp ../../textord/tabfind.cpp ../../textord/tablefind.cpp ../../textord/tablerecog.cpp ../../textord/tabvector.cpp ../../textord/textlineprojection.cpp ../../textord/textord.cpp ../../textord/topitch.cpp ../../textord/tordmain.cpp ../../textord/tospace.cpp ../../textord/tovars.cpp ../../textord/underlin.cpp ../../textord/wordseg.cpp ../../textord/workingpartset.cpp ../../viewer/scrollview.cpp ../../viewer/svmnode.cpp ../../viewer/svpaint.cpp ../../viewer/svutil.cpp ../../wordrec/associate.cpp ../../wordrec/chop.cpp ../../wordrec/chopper.cpp ../../wordrec/drawfx.cpp ../../wordrec/findseam.cpp ../../wordrec/gradechop.cpp ../../wordrec/language_model.cpp ../../wordrec/lm_consistency.cpp ../../wordrec/lm_pain_points.cpp ../../wordrec/lm_state.cpp ../../wordrec/outlines.cpp ../../wordrec/params_model.cpp ../../wordrec/pieces.cpp ../../wordrec/plotedges.cpp ../../wordrec/render.cpp ../../wordrec/segsearch.cpp ../../wordrec/tface.cpp ../../wordrec/wordclass.cpp ../../wordrec/wordrec.cpp
Android NDK: /home/m/AndroidStudioProjects/NDKTest3/jni/../tesseract/android/jni/Android.mk: Cannot find module with tag 'base/port' in import path    
Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?    
Android NDK: The following directories were searched:    
Android NDK:         
Hasani
  • 3,543
  • 14
  • 65
  • 125
  • Here you can solve it: https://priyankvex.wordpress.com/2015/08/30/how-to-build-tesseract-ocr-library-for-android-studio/ – Meghshyam Sonar Mar 13 '18 at 17:46
  • @MeghshyamSonar: is it about building version 4? Cause I used version 3.05 by adding this line to dependecies ` compile 'com.rmtheis:tess-two:8.0.0' ` but it doesn't work well – Hasani Mar 13 '18 at 18:33
  • I have other question, the tutorial you put, seems is written for Linux, how can I use that commands inside Windows? – Hasani Mar 13 '18 at 18:34
  • There is [Android.mk](https://github.com/tesseract-ocr/tesseract/tree/master/android/jni) in tesseract repository, so you can build it as any other native library for android (note that there won't be any Java wrappers like tess-two, so you will need to use c++ API, but that isn't as hard as one may think). – Dmitrii Z. Mar 14 '18 at 08:38
  • @DmitriiZ.: Thank you so much! Please give me any link to instructions about it if exist, or some keywords to search for that. – Hasani Mar 15 '18 at 08:02
  • You can get familiar with android-ndk [here](https://developer.android.com/ndk/guides/index.html). There are also many (A LOT) tutorials which are covering JNI in the internet – Dmitrii Z. Mar 15 '18 at 08:04
  • @DmitriiZ.: As i know, I should create a new project, create a `jni` directory, add the `Android.mk` , `Application.mk` and `.c/cpp` files to it, then add some lines about `externalNativeBuild` and `ndk` to the `build.gradle(app)`. Then compile it by `ndk-build`. But about tesseract, I don't know where are the `.c/cpp` files and which of them should be added to `jni` folder? Also I don't know should I do more things on `build.gradle` file or not? – Hasani Mar 16 '18 at 05:55
  • Clone tesseract repository and add `include path_to_tesseract_anrdoi_jni_Android.mk` line to your project's Android.mk, that would build tesseract as a shared library which you can either use in your c++ code (don't forget to either statically link it to your c++ library or dynamically load either in java or in c++) – Dmitrii Z. Mar 16 '18 at 12:53
  • @DmitriiZ.: As I said above, I am newbie, so I must search for each sentence of your guides, isn't possible to you to write a tutorial about that? – Hasani Mar 16 '18 at 17:41
  • 1
    You are asking in a wrong place. Stack overflow isn't a website for a tutorials. If this are your first steps - I would recommend you to buy a book which covers your needs – Dmitrii Z. Mar 16 '18 at 17:49
  • @DmitriiZ.: I completely edited my question. Am I in a wrong way? – Hasani Mar 16 '18 at 18:37

1 Answers1

0
  1. download/clone this repo
  2. enter the //tesseract-android/tess/tess-two-master/tess-two
  3. make sure you have downloaded Android-ndk, download here if you dont have
  4. now add ndk path to system path/ enviromental variables, check here, if you dont know
  5. in that folder type ndk-build in commandline
Declan Nnadozie
  • 1,805
  • 1
  • 10
  • 20