I have build the project vie steps in the git download page https://github.com/rmtheis/tess-two#build I have installed ndk/sdk an configured in my path environment, also i have add ndk path in project local.properties. Here is my project build log, after i had add the tess-two lib as externel project into my
Information:Gradle tasks [clean, :app:compileDebugSources, :app:compileDebugAndroidTestSources, :tesstwo:compileDebugSources, :tesstwo:compileDebugAndroidTestSources]
:app:clean
:tesstwo:clean
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:tesstwo:compileLint
:tesstwo:copyReleaseLint UP-TO-DATE
:tesstwo:mergeReleaseProguardFiles UP-TO-DATE
:tesstwo:preBuild UP-TO-DATE
:tesstwo:preReleaseBuild UP-TO-DATE
:tesstwo:checkReleaseManifest
:tesstwo:prepareReleaseDependencies
:tesstwo:compileReleaseAidl
:tesstwo:compileReleaseRenderscript
:tesstwo:generateReleaseBuildConfig
:tesstwo:generateReleaseAssets UP-TO-DATE
:tesstwo:mergeReleaseAssets
:tesstwo:generateReleaseResValues UP-TO-DATE
:tesstwo:generateReleaseResources
:tesstwo:packageReleaseResources
:tesstwo:processReleaseManifest
:tesstwo:processReleaseResources
:tesstwo:generateReleaseSources
:tesstwo:processReleaseJavaRes UP-TO-DATE
:tesstwo:compileReleaseJava
:tesstwo:packageReleaseJar
:tesstwo:compileReleaseNdk
In file included from C:\Users\Julian\AndroidStudioProjects\Jtess\tesstwo\src\main\jni\com_googlecode_leptonica_android\box.cpp:17:0:
C:\Users\Julian\AndroidStudioProjects\Jtess\tesstwo\src\main\jni\com_googlecode_leptonica_android\common.h:22:24: fatal error: allheaders.h: No such file or directory
#include <allheaders.h>
^
compilation terminated.
make.exe: *** [C:\Users\Julian\AndroidStudioProjects\Jtess\tesstwo\build\intermediates\ndk\release\obj/local/arm64-v8a/objs/tesstwo/C_\Users\Julian\AndroidStudioProjects\Jtess\tesstwo\src\main\jni\com_googlecode_leptonica_android\box.o] Error 1
Error:Execution failed for task ':tesstwo:compileReleaseNdk'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\Julian\Downloads\android-ndk-r10d\ndk-build.cmd'' finished with non-zero exit value 2
Information:BUILD FAILED
Information:Total time: 38.843 secs
Information:1 error
Information:0 warnings
Information:See complete output in console
The steps you followed to compile Tesseract OCR works only on eclipse, If you want to use it on Android Studio, follow these steps
Source: http://gaut.am/making-an-ocr-android-app-using-tesseract/#comment-184181