Can someone guide me through the process of installing Tesseract OCR engine to use with Eclipse for android development. I have tried a few tutorials but they always lose me at some point. the last thing I tried was trying to download the repository for Tesseract available on github but when following the instructions (after having downloaded the NDK) and following this commands in the command line
`git clone git://github.com/rmtheis/tess-two tess
cd tess
cd tess-two
ndk-build***
android update project --path .
ant release`
when I get to ndk-build it doesnt recognize it as a command. also I have no idea what ant release is or does or if I need to install some software to use it.
Add the ndk folder to your PATH variable. If you are on windows, add the ndk-build path(../android-ndk-r10) to your environment variable PATH. If you are using MAC or linux set/export your PATH variable to include the path to your ndk folder.
Also set ANDROID_NDK_ROOT to point to the ndk folder. This will resolve the ndk-build command not recognized issue.
ant release - is to build your android project for release. This will building your final apk file that goes into play store.
ant debug - is to build the debug build of your application.
Set the JAVA_HOME variable to point to the JDK installation folder for ant to work properly.
set JAVA_HOME=c:\Progra~1\Java\<jdkdir>
Related
When i try to use "ndk-build" i get following error
C:\Users\mack\AndroidStudioProjects\MyApplication>ndk-build 'ndk-build' is not recognized as an internal or external command, operable program or batch file.
Well after some research i found that ndk is not included in path folder of environment variables. Now when i check via SDK i can clearly see that i have checked and installed android NDK using the SDK of android studio, the path of which is
C:\Users\mack\AppData\Local\Android\sdk\ndk-bundle
and i even added this path to environment variables but no use. I am new to android so please pardon me if i am asking a dumb question. But its got me totally confused from like past couple of days.
Do i need to download and install android NDK manually from the link below and install it and then add it to environment variables-path?
I have also included the snapshotot folder contents from NDK installed using android SDK
What i can see from your error is that the PATH to the ndk-build may not be correct or that you do not have a runnable ndk-build file.
Are you sure that ndk-build.cmd is located inside of C:\Users\mack\AppData\Local\Android\sdk\ndk-bundle?
A solution to this can be to download the Windows 32-bit NDK package from Android NDK Download where the ndk-build file is runnable. And add the path to this folder to the
I am new to Ruboto gem. I am currently working on android with Ruboto. I know android. I have installed the all requirements for Rubuto. I try to created the sample project using following command,
$ ruboto gen app --package org.sample.rubotoapp --target android-17
Output: Android SDK not in path
/bin/sh: android: not found
Please anybody can solve my problem. Thanks....
It looks like the Android SDK tools directory is not in your path. If you check you path variable with
echo $PATH
it will probably not contain the Android SDK tools directory. Also, you can check if the "android" command is in your path using
which android
You will probably get an empty response.
If you use Ruboto 0.12.0, you should be able to use
ruboto setup
to configure your environment. Recently, in Android SDK r22, the path to the build tools was changed. This will break your setup, and you will have to add
<android sdk location>/build-tools/17.0.0
to your path manually. This is fixed for Ruboto 0.13.0 which will be released in june.
I'm trying to follow this OpenCV document to import OpenCV sample projects into the android ADT, and am getting the now infamous "Program "C:\android\android-ndk-r8d-windows\ndk-build" not found in PATH" error. My OS is Windows 7 and I use cygwin for any Linux-like commands.
Please note: I already downloaded the NDK package, and already set the value of NDKROOT to be my NDK root folder. I setup NDKROOT both as a system-wide environmental variable, and as an ADT's C/C++ Build environment variable, as shown below:
In my NDK root folder, I made identical copies of the file "ndk-build.cmd", and renamed them as "ndk-build" and "ndk-build.sh" respectively. I chmod+x to all three ndk-build* files.
Now what happens is really puzzling: If I specify the C/C++ Build command to be ${NDKROOT}/ndk-build or ${NDKROOT}/ndk-build.sh, I get the error "Program "C:\android\android-ndk-r8d-windows\ndk-build" not found in PATH". However, if I specify it to be ${NDKROOT}/ndk-build.cmd, ADT apparently finds it, but tries to run it as a Windows command, not as a bash script, as shown below:
The only way I can build a project, is to open a cygwin terminal, cd to the sample project folder, and run the script (either ndk-build or ndk-build.sh), like this:
I googled around for a solution. Although there are lots of "ndk-build.cmd not found in PATH" questions, I have not seen a case like mine. What is happening? I might also post my question to the openCV forum.
Apparently, the command that your Eclipse tries to run (when using the ${NDKROOT}/ndk-build.cmd version) is C:\\android\\android-ndk-r8d-windows\\ndk-build.cmd, which is apparently correct.
The problem is that your ndk-build.cmd is not a windows command file. And it should be. I just downloaded the Windows version of the ndk-r8e and the ndk-build.cmd file is copied here.
Try to download the ndk again or to modify your cmd file.
you should add the ${NDKROOT} variable (which is the folder in which the NDK is located) the same way you did with the PATH variable
Hi. I want to work on an Augmented Reality application. So I followed this link https://developer.vuforia.com/resources/dev-guide/step-2-installing-vuforia-sdk and I installed sdk, ndk, cygwin, vuforia-sdk-android-2-0-31 and I set path for all of them but when I run ImageTargets sample app, I'm getting unsatisfied link exception. Can anyone suggest me where I did wrong and how to solve that issue.
in my case
sdk path: C:\Development\Android\android-sdk-windows
eclips path: C:\Development\Android\android-sdk-windows\eclipse
cygwin path: C:\cygwin
ndk path: C:\Development\Android\vuforia-sdk-android-2-0-31
vuforia-sdk-android path: C:\Development\Android\vuforia-sdk-android-2-0-31
In environment variables I set path to sdk, ndk and cygwin like below:
C:\Development\Android\android-sdk-windows\tools\;
C:\cygwin\bin;
C:\Development\Android\android-ndk-r8\
You should build the native code (C++) by running ndk-build command from cygwin command-line. Open up the Cygwin.bat in your installation directory to access the command-line and change the directory to the root folder of ImageTarget project and run this:
ndk-build
If it successfully builds the native codes, you should see a lib folder added to your project in Eclipse. Now, you may build your APK and run it on your device. You should repeat this step every time you make a change to native codes.
I'm using linux and i have successfully installed ndk and configured it. with the help of Android NDK installation But i can't able to generate build.xml file
root#ndot-173:~/Desktop/NDK4/samples/bitmap-plasma# android update project -p . -s
android: command not found
It shows command not found.
How do i generate build.xml file..?
you have to add android sdk in you PATH or
you use the absolute path of the android command ex: you_android_sdk_path/tools/android