Currently I am using Tesseract 3 in an android application (armv7 & arm64 architectures). But, I need to upgrade to Tesseract 4 for using some of its additional features. How do I upgrade to Tesseract 4?
These are the things I tried so far:
Issues with those approaches:
Error log :
D:\Kunal\tess_related\tess-backup\tess>gradlew assemble
> Task :eyes-two:generateJsonModelDebug FAILED
make: *** No rule to make target 'D:\Kunal\tess_related\tess-backup\tess\tess-two\build//intermediates/ndkBuild/debug/obj/local/armeabi-v7a/liblept.so', needed by 'D:/Kunal/tess_related/tess-backup/tess/eyes-two/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/libhydrogen.so'. Stop.
make: *** No rule to make target 'D:\Kunal\tess_related\tess-backup\tess\tess-two\build//intermediates/ndkBuild/debug/obj/local/arm64-v8a/liblept.so', needed by 'D:/Kunal/tess_related/tess-backup/tess/eyes-two/build/intermediates/ndkBuild/debug/obj/local/arm64-v8a/libhydrogen.so'. Stop.
make: *** No rule to make target 'D:\Kunal\tess_related\tess-backup\tess\tess-two\build//intermediates/ndkBuild/debug/obj/local/x86/liblept.so', needed by 'D:/Kunal/tess_related/tess-backup/tess/eyes-two/build/intermediates/ndkBuild/debug/obj/local/x86/libhydrogen.so'. Stop.
make: *** No rule to make target 'D:\Kunal\tess_related\tess-backup\tess\tess-two\build//intermediates/ndkBuild/debug/obj/local/x86_64/liblept.so', needed by 'D:/Kunal/tess_related/tess-backup/tess/eyes-two/build/intermediates/ndkBuild/debug/obj/local/x86_64/libhydrogen.so'. Stop.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':eyes-two:generateJsonModelDebug'.
> Build command failed.
Error while executing process C:\Users\Asus\AppData\Local\Android\Sdk\ndk-bundle\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=D:\Kunal\tess_related\tess-backup\tess\eyes-two\src\main\jni\Android.mk NDK_APPLICATION_MK=D:\Kunal\tess_related\tess-backup\tess\eyes-two\src\main\jni\Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=1 APP_PLATFORM=android-16 NDK_OUT=D:/Kunal/tess_related/tess-backup/tess/eyes-two/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=D:\Kunal\tess_related\tess-backup\tess\eyes-two\build\intermediates\ndkBuild\debug\lib TESSERACT_BUILD_PATH=D:\Kunal\tess_related\tess-backup\tess\tess-two\build APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
md "D:\Kunal\tess_related\tess-backup\tess\eyes-two\build\intermediates\ndkBuild\debug\lib\armeabi-v7a" >NUL 2>NUL || rem
C:/Users/Asus/AppData/Local/Android/Sdk/ndk-bundle/build//../prebuilt/windows-x86_64/bin/echo.exe [armeabi-v7a] "Gdbserver ": "[arm-linux-androideabi] D:\Kunal\tess_related\tess-backup\tess\eyes-two\build\intermediates\ndkBuild\debug\lib/armeabi-v7a/gdbserver"
copy /b/y "C:\Users\Asus\AppData\Local\Android\Sdk\ndk-bundle\build\\..\prebuilt\android-arm\gdbserver\gdbserver" "D:\Kunal\tess_related\tess-backup\tess\eyes-two\build\intermediates\ndkBuild\debug\lib\armeabi-v7a\gdbserver" > NUL
C:/Users/Asus/AppData/Local/Android/Sdk/ndk-bundle/build//../prebuilt/windows-x86_64/bin/echo.exe [armeabi-v7a] "Gdbsetup ": "D:\Kunal\tess_related\tess-backup\tess\eyes-two\build\intermediates\ndkBuild\debug\lib/armeabi-v7a/gdb.setup"
C:/Users/Asus/AppData/Local/Android/Sdk/ndk-bundle/build//../prebuilt/windows-x86_64/bin/echo.exe "set solib-search-path D:/Kunal/tess_related/tess-backup/tess/eyes-two/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a" > D:\Kunal\tess_related\tess-backup\tess\eyes-two\build\intermediates\ndkBuild\debug\lib/armeabi-v7a/gdb.setup
C:/Users/Asus/AppData/Local/Android/Sdk/ndk-bundle/build//../prebuilt/windows-x86_64/bin/echo.exe "directory C:/Users/Asus/AppData/Local/Android/Sdk/ndk-bundle/build//../toolchains/llvm/prebuilt/windows-x86_64/sysroot D:/Kunal/tess_related/tess-backup/tess/eyes-two/src/main/jni/common C:/Users/Asus/AppData/Local/Android/Sdk/ndk-bundle/build//../sources/android/cpufeatures D:/Kunal/tess_related/tess-backup/tess/eyes-two/src/main/jni/hydrogen/src D:\Kunal\tess_related\tess-backup\tess\tess-two\build/../../tess-two/jni/com_googlecode_leptonica_android D:\Kunal\tess_related\tess-backup\tess\tess-two\build/../../leptonica/src D:/Kunal/tess_related/tess-backup/tess/eyes-two/src/main/jni/imageutils/../common D:/Kunal/tess_related/tess-backup/tess/eyes-two/src/main/jni/opticalflow/../common" >> D:\Kunal\tess_related\tess-backup\tess\eyes-two\build\intermediates\ndkBuild\debug\lib/armeabi-v7a/gdb.setup
md "D:\Kunal\tess_related\tess-backup\tess\eyes-two\build\intermediates\ndkBuild\debug\obj\local\armeabi-v7a\objs\hydrogen\src" >NUL 2>NUL || rem
C:/Users/Asus/AppData/Local/Android/Sdk/ndk-bundle/build//../prebuilt/windows-x86_64/bin/echo.exe [armeabi-v7a] "Compile++ thumb": "hydrogen <= clusterer.cpp"
C:/Users/Asus/AppData/Local/Android/Sdk/ndk-bundle/build//../toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -MMD -MP -MF D:/Kunal/tess_related/tess-backup/tess/eyes-two/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs/hydrogen/src/clusterer.o.d -target armv7-none-linux-androideabi16 -fdata-sections -ffunction-sections -fstack-protector-strong -funwind-tables -no-canonical-prefixes --sysroot C:/Users/Asus/AppData/Local/Android/Sdk/ndk-bundle/build//../toolchains/llvm/prebuilt/windows-x86_64/sysroot -g -Wno-invalid-command-line-argument -Wno-unused-command-line-argument -D_FORTIFY_SOURCE=2 -fno-exceptions -fno-rtti -fpic -march=armv7-a -mthumb -Oz -DNDEBUG -ID:/Kunal/tess_related/tess-backup/tess/eyes-two/src/main/jni/hydrogen/src -ID:\Kunal\tess_related\tess-backup\tess\tess-two\build/../../tess-two/jni/com_googlecode_leptonica_android -ID:\Kunal\tess_related\tess-backup\tess\tess-two\build/../../leptonica/src -ID:/Kunal/tess_related/tess-backup/tess/eyes-two/src/main/jni/hydrogen -DANDROID -Wno-error=format-security -c D:/Kunal/tess_related/tess-backup/tess/eyes-two/src/main/jni/hydrogen/src/clusterer.cpp -o D:/Kunal/tess_related/tess-backup/tess/eyes-two/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs/hydrogen/src/clusterer.o
C:/Users/Asus/AppData/Local/Android/Sdk/ndk-bundle/build//../prebuilt/windows-x86_64/bin/echo.exe [armeabi-v7a] "Compile++ thumb": "hydrogen <= hydrogentextdetector.cpp"
C:/Users/Asus/AppData/Local/Android/Sdk/ndk-bundle/build//../toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -MMD -MP -MF D:/Kunal/tess_related/tess-backup/tess/eyes-two/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs/hydrogen/src/hydrogentextdetector.o.d -target armv7-none-linux-androideabi16 -fdata-sections -ffunction-sections -fstack-protector-strong -funwind-tables -no-canonical-prefixes --sysroot C:/Users/Asus/AppData/Local/Android/Sdk/ndk-bundle/build//../toolchains/llvm/prebuilt/windows-x86_64/sysroot -g -Wno-invalid-command-line-argument -Wno-unused-command-line-argument -D_FORTIFY_SOURCE=2 -fno-exceptions -fno-rtti -fpic -march=armv7-a -mthumb -Oz -DNDEBUG -ID:/Kunal/tess_related/tess-backup/tess/eyes-two/src/main/jni/hydrogen/src -ID:\Kunal\tess_related\tess-backup\tess\tess-two\build/../../tess-two/jni/com_googlecode_leptonica_android -ID:\Kunal\tess_related\tess-backup\tess\tess-two\build/../../leptonica/src -ID:/Kunal/tess_related/tess-backup/tess/eyes-two/src/main/jni/hydrogen -DANDROID -Wno-error=format-security -c D:/Kunal/tess_related/tess-backup/tess/eyes-two/src/main/jni/hydrogen/src/hydrogentextdetector.cpp -o D:/Kunal/tess_related/tess-backup/tess/eyes-two/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs/hydrogen/src/hydrogentextdetector.o
C:/Users/Asus/AppData/Local/Android/Sdk/ndk-bundle/build//../prebuilt/windows-x86_64/bin/echo.exe [armeabi-v7a] "Compile++ thumb": "hydrogen <= thresholder.cpp"
C:/Users/Asus/AppData/Local/Android/Sdk/ndk-bundle/build//../toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -MMD -MP -MF D:/Kunal/tess_related/tess-backup/tess/eyes-two/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs/hydrogen/src/thresholder.o.d -target armv7-none-linux-androideabi16 -fdata-sections -ffunction-sections -fstack-protector-strong -funwind-tables -no-canonical-prefixes --sysroot C:/Users/Asus/AppData/Local/Android/Sdk/ndk-bundle/build//../toolchains/llvm/prebuilt/windows-x86_64/sysroot -g -Wno-invalid-command-line-argument -Wno-unused-command-line-argument -D_FORTIFY_SOURCE=2 -fno-exceptions -fno-rtti -fpic -march=armv7-a -mthumb -Oz -DNDEBUG -ID:/Kunal/tess_related/tess-backup/tess/eyes-two/src/main/jni/hydrogen/src -ID:\Kunal\tess_related\tess-backup\tess\tess-two\build/../../tess-two/jni/com_googlecode_leptonica_android -ID:\Kunal\tess_related\tess-backup\tess\tess-two\build/../../leptonica/src -ID:/Kunal/tess_related/tess-backup/tess/eyes-two/src/main/jni/hydrogen -DANDROID -Wno-error=format-security -c D:/Kunal/tess_related/tess-backup/tess/eyes-two/src/main/jni/hydrogen/src/thresholder.cpp -o D:/Kunal/tess_related/tess-backup/tess/eyes-two/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs/hydrogen/src/thresholder.o
C:/Users/Asus/AppData/Local/Android/Sdk/ndk-bundle/build//../prebuilt/windows-x86_64/bin/echo.exe [armeabi-v7a] "Compile++ thumb": "hydrogen <= utilities.cpp"
C:/Users/Asus/AppData/Local/Android/Sdk/ndk-bundle/build//../toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -MMD -MP -MF D:/Kunal/tess_related/tess-backup/tess/eyes-two/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs/hydrogen/src/utilities.o.d -target armv7-none-linux-androideabi16 -fdata-sections -ffunction-sections -fstack-protector-strong -funwind-tables -no-canonical-prefixes --sysroot C:/Users/Asus/AppData/Local/Android/Sdk/ndk-bundle/build//../toolchains/llvm/prebuilt/windows-x86_64/sysroot -g -Wno-invalid-command-line-argument -Wno-unused-command-line-argument -D_FORTIFY_SOURCE=2 -fno-exceptions -fno-rtti -fpic -march=armv7-a -mthumb -Oz -DNDEBUG -ID:/Kunal/tess_related/tess-backup/tess/eyes-two/src/main/jni/hydrogen/src -ID:\Kunal\tess_related\tess-backup\tess\tess-two\build/../../tess-two/jni/com_googlecode_leptonica_android -ID:\Kunal\tess_related\tess-backup\tess\tess-two\build/../../leptonica/src -ID:/Kunal/tess_related/tess-backup/tess/eyes-two/src/main/jni/hydrogen -DANDROID -Wno-error=format-security -c D:/Kunal/tess_related/tess-backup/tess/eyes-two/src/main/jni/hydrogen/src/utilities.cpp -o D:/Kunal/tess_related/tess-backup/tess/eyes-two/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs/hydrogen/src/utilities.o
C:/Users/Asus/AppData/Local/Android/Sdk/ndk-bundle/build//../prebuilt/windows-x86_64/bin/echo.exe [armeabi-v7a] "Compile++ thumb": "hydrogen <= validator.cpp"
C:/Users/Asus/AppData/Local/Android/Sdk/ndk-bundle/build//../toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -MMD -MP -MF D:/Kunal/tess_related/tess-backup/tess/eyes-two/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs/hydrogen/src/validator.o.d -target armv7-none-linux-androideabi16 -fdata-sections -ffunction-sections -fstack-protector-strong -funwind-tables -no-canonical-prefixes --sysroot C:/Users/Asus/AppData/Local/Android/Sdk/ndk-bundle/build//../toolchains/llvm/prebuilt/windows-x86_64/sysroot -g -Wno-invalid-command-line-argument -Wno-unused-command-line-argument -D_FORTIFY_SOURCE=2 -fno-exceptions -fno-rtti -fpic -march=armv7-a -mthumb -Oz -DNDEBUG -ID:/Kunal/tess_related/tess-backup/tess/eyes-two/src/main/jni/hydrogen/src -ID:\Kunal\tess_related\tess-backup\tess\tess-two\build/../../tess-two/jni/com_googlecode_leptonica_android -ID:\Kunal\tess_related\tess-backup\tess\tess-two\build/../../leptonica/src -ID:/Kunal/tess_related/tess-backup/tess/eyes-two/src/main/jni/hydrogen -DANDROID -Wno-error=format-security -c D:/Kunal/tess_related/tess-backup/tess/eyes-two/src/main/jni/hydrogen/src/validator.cpp -o D:/Kunal/tess_related/tess-backup/tess/eyes-two/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs/hydrogen/src/validator.o
md "D:\Kunal\tess_related\tess-backup\tess\eyes-two\build\intermediates\ndkBuild\debug\obj\local\armeabi-v7a\objs\hydrogen\jni" >NUL 2>NUL || rem
C:/Users/Asus/AppData/Local/Android/Sdk/ndk-bundle/build//../prebuilt/windows-x86_64/bin/echo.exe [armeabi-v7a] "Compile++ thumb": "hydrogen <= hydrogentextdetector.cpp"
C:/Users/Asus/AppData/Local/Android/Sdk/ndk-bundle/build//../toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -MMD -MP -MF D:/Kunal/tess_related/tess-backup/tess/eyes-two/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs/hydrogen/jni/hydrogentextdetector.o.d -target armv7-none-linux-androideabi16 -fdata-sections -ffunction-sections -fstack-protector-strong -funwind-tables -no-canonical-prefixes --sysroot C:/Users/Asus/AppData/Local/Android/Sdk/ndk-bundle/build//../toolchains/llvm/prebuilt/windows-x86_64/sysroot -g -Wno-invalid-command-line-argument -Wno-unused-command-line-argument -D_FORTIFY_SOURCE=2 -fno-exceptions -fno-rtti -fpic -march=armv7-a -mthumb -Oz -DNDEBUG -ID:/Kunal/tess_related/tess-backup/tess/eyes-two/src/main/jni/hydrogen/src -ID:\Kunal\tess_related\tess-backup\tess\tess-two\build/../../tess-two/jni/com_googlecode_leptonica_android -ID:\Kunal\tess_related\tess-backup\tess\tess-two\build/../../leptonica/src -ID:/Kunal/tess_related/tess-backup/tess/eyes-two/src/main/jni/hydrogen -DANDROID -Wno-error=format-security -c D:/Kunal/tess_related/tess-backup/tess/eyes-two/src/main/jni/hydrogen/jni/hydrogentextdetector.cpp -o D:/Kunal/tess_related/tess-backup/tess/eyes-two/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs/hydrogen/jni/hydrogentextdetector.o
C:/Users/Asus/AppData/Local/Android/Sdk/ndk-bundle/build//../prebuilt/windows-x86_64/bin/echo.exe [armeabi-v7a] "Compile++ thumb": "hydrogen <= thresholder.cpp"
C:/Users/Asus/AppData/Local/Android/Sdk/ndk-bundle/build//../toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -MMD -MP -MF D:/Kunal/tess_related/tess-backup/tess/eyes-two/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs/hydrogen/jni/thresholder.o.d -target armv7-none-linux-androideabi16 -fdata-sections -ffunction-sections -fstack-protector-strong -funwind-tables -no-canonical-prefixes --sysroot C:/Users/Asus/AppData/Local/Android/Sdk/ndk-bundle/build//../toolchains/llvm/prebuilt/windows-x86_64/sysroot -g -Wno-invalid-command-line-argument -Wno-unused-command-line-argument -D_FORTIFY_SOURCE=2 -fno-exceptions -fno-rtti -fpic -march=armv7-a -mthumb -Oz -DNDEBUG -ID:/Kunal/tess_related/tess-backup/tess/eyes-two/src/main/jni/hydrogen/src -ID:\Kunal\tess_related\tess-backup\tess\tess-two\build/../../tess-two/jni/com_googlecode_leptonica_android -ID:\Kunal\tess_related\tess-backup\tess\tess-two\build/../../leptonica/src -ID:/Kunal/tess_related/tess-backup/tess/eyes-two/src/main/jni/hydrogen -DANDROID -Wno-error=format-security -c D:/Kunal/tess_related/tess-backup/tess/eyes-two/src/main/jni/hydrogen/jni/thresholder.cpp -o D:/Kunal/tess_related/tess-backup/tess/eyes-two/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs/hydrogen/jni/thresholder.o
C:/Users/Asus/AppData/Local/Android/Sdk/ndk-bundle/build//../prebuilt/windows-x86_64/bin/echo.exe [armeabi-v7a] "Compile++ thumb": "hydrogen <= jni.cpp"
C:/Users/Asus/AppData/Local/Android/Sdk/ndk-bundle/build//../toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -MMD -MP -MF D:/Kunal/tess_related/tess-backup/tess/eyes-two/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs/hydrogen/jni/jni.o.d -target armv7-none-linux-androideabi16 -fdata-sections -ffunction-sections -fstack-protector-strong -funwind-tables -no-canonical-prefixes --sysroot C:/Users/Asus/AppData/Local/Android/Sdk/ndk-bundle/build//../toolchains/llvm/prebuilt/windows-x86_64/sysroot -g -Wno-invalid-command-line-argument -Wno-unused-command-line-argument -D_FORTIFY_SOURCE=2 -fno-exceptions -fno-rtti -fpic -march=armv7-a -mthumb -Oz -DNDEBUG -ID:/Kunal/tess_related/tess-backup/tess/eyes-two/src/main/jni/hydrogen/src -ID:\Kunal\tess_related\tess-backup\tess\tess-two\build/../../tess-two/jni/com_googlecode_leptonica_android -ID:\Kunal\tess_related\tess-backup\tess\tess-two\build/../../leptonica/src -ID:/Kunal/tess_related/tess-backup/tess/eyes-two/src/main/jni/hydrogen -DANDROID -Wno-error=format-security -c D:/Kunal/tess_related/tess-backup/tess/eyes-two/src/main/jni/hydrogen/jni/jni.cpp -o D:/Kunal/tess_related/tess-backup/tess/eyes-two/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs/hydrogen/jni/jni.o
md "D:\Kunal\tess_related\tess-backup\tess\eyes-two\build\intermediates\ndkBuild\debug\obj\local\armeabi-v7a" >NUL 2>NUL || rem
make: *** No rule to make target 'D:\Kunal\tess_related\tess-backup\tess\tess-two\build//intermediates/ndkBuild/debug/obj/local/armeabi-v7a/liblept.so', needed by 'D:/Kunal/tess_related/tess-backup/tess/eyes-two/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/libhydrogen.so'. Stop.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings