Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Integration issue to tess-two (Tesseract Tools for Android)library into an Android studio and build ndk

I want to import tess-two library in android studio and after compilation it show error in ndk build. I have already tries solution given on stackoverflow. like , Execution failed for task ':app:compileDebugNdk' but it did not resolved my issue. please suggest me where i am doing wrong.

It show the following error :

Error:error: undefined reference to 'isnanf'

Error:error: undefined reference to '__isinff'
Error:error: undefined reference to 'isnanf'
[arm64-v8a] Install        : libtess.so => libs/arm64-v8a/libtess.so
Error:error: undefined reference to 'isnanf'
Error:error: undefined reference to '__isinff'
Error:error: undefined reference to 'isnanf'
[x86_64] Install        : libjpgt.so => libs/x86_64/libjpgt.so
Error:error: linker command failed with exit code 1 (use -v to see invocation)
Error:error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [obj/local/armeabi-v7a/libtess.so] Error 1

make: *** Waiting for unfinished jobs....
make: *** [obj/local/armeabi/libtess.so] Error 1
make: Leaving directory `D:/OCR/tess-two-master/tess-two-master/tess-two'
:tess-two:ndkBuild FAILED

Error:Execution failed for task ':tess-two:ndkBuild'.
Process 'command 'D:\SDK\sdk\ndk-bundle/ndk-build.cmd'' finished with non-zero exit value 2  
like image 258
Rajan1404930 Avatar asked Mar 17 '16 09:03

Rajan1404930


1 Answers

It turns out that the root cause of this error is that NDK r11 doesn't support android-8 (Android 2.2.x), whereas NDK r10 did.

Changing the Application.mk file to use APP_PLATFORM := android-9 fixes this.

like image 61
rmtheis Avatar answered Nov 12 '22 11:11

rmtheis