Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8593609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:01:49+00:00 2026-06-12T00:01:49+00:00

I downloaded Tesseract OCR for Android from here and I’m trying to build it

  • 0

I downloaded Tesseract OCR for Android from here and I’m trying to build it as a library project for my own app using the NDK. I’ve received some useful feedback on how to do this here. First, I do this on the command-line ([path] is shorthand for the path to the tess-two project):

> cd [path]\tess-two

> C:\android-ndk-r8b-windows\android-ndk-r8b\ndk-build -j8

"Compile thumb : lept <= adaptmap.c

[...]

"Compile++ thumb : lept <= writefile.cpp

Prebuilt       : libgnustl_static.a <= <NDK>/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/

"Compile++ thumb : tess <= applybox.cpp

[...]

"Compile++ thumb : tess <= tessbaseapi.cpp

"Compile thumb : lept <= adaptmap.c

[...]

"Compile++ thumb : lept <= pixa.cpp

Prebuilt       : libgnustl_static.a <= <NDK>/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a/

"Compile++ thumb : lept <= jni.cpp

[...]

"Compile++ thumb : tess <= tessbaseapi.cpp

"Compile x86  : lept <= affine.c

[...]

"Compile++ x86  : lept <= readfile.cpp

Prebuilt       : libgnustl_static.a <= <NDK>/sources/cxx-stl/gnu-libstdc++/4.6/libs/x86/

"Compile++ x86  : tess <= baseapi.cpp

[...]

"Compile++ x86  : tess <= wordclass.cpp

SharedLibrary  : liblept.so

SharedLibrary  : liblept.so

"Compile++ x86  : tess <= tessbaseapi.cpp

SharedLibrary  : liblept.so

"Compile++ x86  : tess <= wordrec.cpp

SharedLibrary  : libtess.so

Install        : liblept.so => libs/x86/liblept.so

Install        : liblept.so => libs/armeabi/liblept.so

SharedLibrary  : libtess.so

Install        : liblept.so => libs/armeabi-v7a/liblept.so

SharedLibrary  : libtess.so

Install        : libtess.so => libs/armeabi/libtess.so

Install        : libtess.so => libs/armeabi-v7a/libtess.so

Install        : libtess.so => libs/x86/libtess.so


> C:\Users\User\android-sdk\tools\android.bat update project --path .

Failed to convert path to a short DOS path: C:\Windows\system32\java.exe
'javaw_exe' is not recognized as an internal or external command,
operable program or batch file.
Updated local.properties

Updated file [path]\tess-two\proguard-project.txt

It seems that there are sub-projects. If you want to update them

please use the --subprojects parameter.

> set JAVA_HOME=C:\Java\JDK
> Buildfile: [path]\tess-two\build.xml

-set-mode-check:

-set-release-mode:

-release-obfuscation-check:
     [echo] proguard.config is ${proguard.config}

-check-env:
 [checkenv] Android SDK Tools Revision 20.0.3
 [checkenv] Installed at C:\Users\User\android-sdks

-setup:
     [echo] Project Name: tess-two
  [gettype] Project Type: Android Library

-build-setup:
     [echo] Resolving Build Target for tess-two...
[gettarget] Project Target:   Google APIs
[gettarget] Vendor:           Google Inc.
[gettarget] Platform Version: 4.1
[gettarget] API level:        16
     [echo] ----------
     [echo] Creating output directories if needed...
     [echo] ----------
     [echo] Resolving Dependencies for tess-two...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency] 
[dependency] ------------------
[dependency] API<=15: Adding annotations.jar to the classpath.
     [echo] ----------
     [echo] Building Libraries with 'release'...
   [subant] No sub-builds to iterate on

-pre-build:

-code-gen:
[mergemanifest] Found Deleted Target File
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
     [echo] Handling aidl files...
     [aidl] No AIDL files to compile.
     [echo] ----------
     [echo] Handling RenderScript files...
[renderscript] No RenderScript files to compile.
     [echo] ----------
     [echo] Handling Resources...
     [aapt] Found new input file
     [aapt] Generating resource IDs...
     [echo] ----------
     [echo] Handling BuildConfig class...
[buildconfig] No need to generate new BuildConfig.

-pre-compile:

-compile:
     [echo] Creating library output jar file...

-post-compile:

-obfuscate:

-dex:
     [echo] Library project: do not convert bytecode...

-crunch:
   [crunch] Crunching PNG Files in source dir: [path]\tess-two\res
   [crunch] To destination dir: [path]\tess-two\bin\res
   [crunch] Crunched 0 PNG files to update cache

-package-resources:
     [echo] Library project: do not package resources...

-package:
     [echo] Library project: do not package apk...

-post-package:

-release-prompt-for-password:

-release-nosign:
     [echo] 
[propertyfile] Updating property file: [path]\tess-two\bin\build.prop
[propertyfile] Updating property file: [path]\tess-two\bin\build.prop
[propertyfile] Updating property file: [path]\tess-two\bin\build.prop
[propertyfile] Updating property file: [path]\tess-two\bin\build.prop

-release-sign:

-post-build:

release:

BUILD SUCCESSFUL
Total time: 1 second

Then, I do this:
File -> Import -> Android -> Existing Code Into Workspace -> Browse -> Select current workspace directory -> Make sure tess-two is selected in the list that comes up -> Finish.

Then I right-click on my own app, go to Properties -> Android tab -> Add… (under Library section) -> select tess-two -> Click OK -> Check “Is Library” -> OK.

However, after all this, I still get the follwing error when running my app:

09-23 13:02:42.532: E/AndroidRuntime(675): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load lept: findLibrary returned null
09-23 13:02:42.532: E/AndroidRuntime(675):  at java.lang.Runtime.loadLibrary(Runtime.java:365)
09-23 13:02:42.532: E/AndroidRuntime(675):  at java.lang.System.loadLibrary(System.java:535)
09-23 13:02:42.532: E/AndroidRuntime(675):  at com.googlecode.tesseract.android.TessBaseAPI.<clinit>(TessBaseAPI.java:47)

The project.properties for my own app is:

target=android-16
android.library.reference.1=..\\OpenCV\\sdk\\java
android.library.reference.2=../Tesseract/tess-two
android.library=true

What’s going on?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T00:01:51+00:00Added an answer on June 12, 2026 at 12:01 am

    I got it, the problem was that I wasn’t properly initializing the API in my code. The proper syntax is:

    tesseract.init("/mnt/sdcard/", "eng");
    

    assuming you’ve got a folder “tessdata” under mnt/sdcard. Now it loads perfectly! Thanks so much for all your help, rmthesis!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I downloaded example code of an Android project featuring AdMob ads from here .
I downloaded the Facebook SDK for Android and I'm using it in my app
I downloaded a sample project from net when I opened it its object library
I'm compiling tesseract-android-tools-1.00 by using android-ndk r8b(Tesseract-android-tools contain the android tools for compiling tesseract
I downloaded Android's Browser project (from git) and imported it to Eclipse. I cannot
Downloaded Reachability from Apple, using this method to check for an active connection: -(BOOL)isReachable{
I downloaded a project from TouchMyPixel and when I try to run it with
I downloaded Mono software (http://xamarin.com/monoforandroid) and the samples from the xamarin website (http://samples.xamarin.com/Android). When
Downloaded Facebook C# SDK 5.4.1 from here . I've been through the CS-WinForms solution
I downloaded GCC 4.5 from http://www.netgull.com/gcc/releases/gcc-4.5.0/ but when I try to setup / build

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.