I'm trying to build eyes-two from the tess-two project using android studio. I did the ndk-build android ... ant release stuff for tess-two and eyes-two, imported eyes-two, configured ndk.dir path and all, but, while build I get the following error message:
allheaders.h: No such file or directory
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':tesstwo:compileReleaseNdk'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
/home/italomaia/.apps/android-ndk-r10c/ndk-build NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/home/italomaia/workspace/eyes-two/tesstwo/build/intermediates/ndk/release/Android.mk APP_PLATFORM=android-8 NDK_OUT=/home/italomaia/workspace/eyes-two/tesstwo/build/intermediates/ndk/release/obj NDK_LIBS_OUT=/home/italomaia/workspace/eyes-two/tesstwo/build/intermediates/ndk/release/lib APP_ABI=all
Error Code:
2
Output:
In file included from /home/italomaia/workspace/eyes-two/tesstwo/src/main/jni/com_googlecode_leptonica_android/writefile.cpp:17:0:
/home/italomaia/workspace/eyes-two/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: *** [$HOME/workspace/eyes-two/tesstwo/build/intermediates/ndk/release/obj/local/arm64-v8a/objs/tesstwo/$HOME/workspace/eyes-two/tesstwo/src/main/jni/com_googlecode_leptonica_android/writefile.o] Error 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
You should build it using the instructions from here. https://github.com/rmtheis/tess-two/tree/master I had to slightly modify the instructions. To build the latest tess-two code, run the following commands in the terminal:
git clone git://github.com/rmtheis/tess-two tess cd tess cd tess-two ndk-build android update project --path . --target 13
To build eyes-two, additionally run the following:cd .. cd eyes-two ndk-build android update project --path . --target 13
from there I opened android studio, File->import Sample and imported the Hello jni sample. after that was set up and compiling in android studio, I did File->New->Import Module pointed it at the tess-two directory selected all the defaults. at that point it gave me errors because of gradle issues. So I made this gradle file for the tess-two module:Then it built successfully