0

I just installed Android NDK, r5b, and while trying to follow the steps from Exploring the hello-jni Sample, on the command line I receive the error:

MacBook-2:~ mvermant$ cd ndk/samples/hello-jni
MacBook-2:hello-jni mvermant$ android update project -p . -s
-bash: android: command not found

I'm using Eclipse Helios release 2 with Android SDK r10 and ADT 10.0.0 on MAC 10.6.6. I have also checked to have GNU Make 3.81, and installed GNU Awk(though I am not sure it's in the right place).

I've searched a lot, and seems there might be a class path missing somewhere, but I can't figure out where exactly and what to do to fix it.

Adinia
  • 3,722
  • 5
  • 40
  • 58

1 Answers1

1

You should make sure the tools directory of your android-sdk is on your (shell) path.

Something like:

export PATH="/path/to/sdk/tools:$PATH"

before you execute your command.

In general you will also need two other directories to be on your path:

  • /path/to/sdk/platform-tools - for adb and other android sdk tools
  • /path/to/ndk - for ndk-build and ndk-gdb, which are ndk tools

You can also do some setup so that you don't have to run these commands every time you open Terminal.

Matthew
  • 44,826
  • 10
  • 98
  • 87
  • By including the other two paths, you mean exporting them also? Do I have to navigate to a specific directory before exporting them? – Adinia Mar 08 '11 at 16:15
  • Yes, you use the same export statement, replacing /path/to/sdk/tools with /path/to/ndk etc. – Matthew Mar 08 '11 at 16:16