[英]Building google tesseract with NDK for using in android studio
I am trying to make an simple OCR app using google tesseract. 我正在尝试使用Google tesseract制作一个简单的OCR应用。 For this purpose, i am following this tutorial .
为此,我正在遵循本教程 。 But running ant release command, i am getting an error.
但是运行ant release命令,我得到一个错误。 The error message is like this:
错误消息是这样的:
Buildfile: C:\\Users\\Pial-PC\\Desktop\\tesseract\\eyes-two\\build.xml
构建文件:C:\\ Users \\ Pial-PC \\ Desktop \\ tesseract \\ eyestwo \\ build.xml
BUILD FAILED C:\\Users\\Pial-PC\\Desktop\\tesseract\\eyes-two\\build.xml:46: sdk.dir is missing.
失败的C:\\ Users \\ Pial-PC \\ Desktop \\ tesseract \\ eyestwo \\ build.xml:46:缺少sdk.dir。 Make sure to generate local.properties using 'android update project' or to inject it through an env var
确保使用“ android更新项目”生成local.properties或通过env var注入它
Total time: 1 second
总时间:1秒
My question is how can i remove this problem? 我的问题是如何解决这个问题? Is ant release actually needed to build tesseract in order to use it in android studio ?
为了在Android Studio中使用tesseract,实际上是否需要使用ant版本 ?
Looks like you didn't run android update project --path .
看起来您没有运行
android update project --path .
to generate the local.properties
file. 生成
local.properties
文件。
But there's an easier way-- as of a recent update, you can follow the instructions to include the OCR engine in your app as a pre-compiled binary. 但是,有一种更简单的方法-从最近的更新开始,您可以按照说明将OCR引擎作为预编译的二进制文件包含在您的应用程序中。 To use the current version, add
要使用当前版本,请添加
compile 'com.rmtheis:tess-two:5.4.0'
to the dependencies
section of your app's app/build.gradle
. 到应用程序的
app/build.gradle
的dependencies
部分。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.