Android update project -path "command not found"

I am trying to develop an application using OCR that runs on Android. I follow the steps in

http://gaut.am/making-an-ocr-android-app-using-tesseract/

I went through the “ndk-build” step and switched to the “Android project project”. step. But it shows “android: command not found error”. I am new to Android development. Can someone please tell me how to set path variables for me.

Thanks in advance.

+8
android android-ndk
source share
4 answers

Edit the Festus answer:

do not do this: export PATH=$ANDROID_HOME/tools . this will change the whole PATH variable.

Use the following instead:

 export PATH=$PATH:$ANDROID_HOME/tools export PATH=$PATH:$ANDROID_HOME/platform-tools 

This should add a path to tools and platform tools to the existing PATH.

+8
source share

If you are using Mac or Linux

Assuming you set ANDROID_HOME to point to the sdk installation:

 export ANDROID_HOME=/Applications/android-sdks 

Add tools to PATH

 export PATH=${PATH}:${ANDROID_HOME}/tools 

Add platform tools to PATH

 export PATH=${PATH}:${ANDROID_HOME}/platform-tools 
+3
source share

Instead of using this command ---> android -p update project

use this command

Update project android.bat -p {project path}

+2
source share

I ran into the same problem on Windows. I did it like this and it works for me.

  $ $ANDROID_SDK/sdk/tools/android.bat update project -p . Updated local.properties Updated file C:\ndk\android-ndk-r9b\samples\hello-jni\proguard-project.txt It seems that there are sub-projects. If you want to update them please use the --subprojects parameter 

Here, the “cd” command was first used to go to the ndk project directory that I used “.” (dot) for path (-p)

$ ANDROID_SDK / sdk / tools / update project android.bat -p.

0
source share

All Articles