Pial Kanti
Pial Kanti

Reputation: 1610

Building google tesseract with NDK for using in android studio

I am trying to make an simple OCR app using google tesseract. For this purpose, i am following this tutorial. But running ant release command, i am getting an error. The error message is like this:

Buildfile: C:\Users\Pial-PC\Desktop\tesseract\eyes-two\build.xml

BUILD FAILED C:\Users\Pial-PC\Desktop\tesseract\eyes-two\build.xml:46: sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through an env var

Total time: 1 second

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 ?

Upvotes: 0

Views: 691

Answers (1)

rmtheis
rmtheis

Reputation: 5806

Looks like you didn't run android update project --path . to generate the local.properties file.

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. 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.

Upvotes: 1

Related Questions