【发布时间】:2016-07-03 13:48:00
【问题描述】:
我想在 android studio 中导入 tess-two 库,编译后在 ndk build 中显示错误。我已经尝试过在 stackoverflow 上给出的解决方案。 喜欢 , Execution failed for task ':app:compileDebugNdk' 但它并没有解决我的问题。请建议我哪里做错了。
它显示以下错误:
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
【问题讨论】:
-
如果您只想要一个工作库,您可以使用预编译版本(参见“使用”here)或使用 NDK r10e 构建。
-
谢谢你,它已经用r10e编译了。
-
嗨,我在 ubuntu 中使用相同的库,但我收到此错误错误:任务“:tess-two:ndkBuild”执行失败。 > 启动进程 'command 'ndk-build'' 时出现问题。请尽快帮助我。在此先感谢。
-
@rmtheis 你好,你的意思是我们只需要转到link 然后克隆
tess-two并获取一个培训文件并创建一个新的Android Studio项目并只需编辑应用程序模块的@ 987654327@ 文件添加tess-two作为外部依赖项(通过添加单行)?这是你的意思吗? -
首先用 ndk n 编译你的 tess-two 库,然后导入为库。
标签: android c++ c android-ndk tess-two