I have problem that I can't use "ndk-build" command.

7,728 views
Skip to first unread message

brighteyes

unread,
Oct 1, 2010, 3:34:35 AM10/1/10
to android-ndk
Hi. Let me ask about my build problem with ndk r4 version.

I have used ndk of which version is r3, and I installed ndk r4b today.
I tried to build with "make" command my sample code and I succeeded.
However, I failed to build with "ndk-build" command.

brighteyes@Kate-PC /android_ndk
$ ndk-build
bash: ndk-build: command not found

I think ndk-build command should be working at my ndk root folder.
I set my ndk root folder as "D:\Android\android-ndk-windows" and I can
see the "ndk-build" script file on file explorer.

I would appreciate somebody who know what is problem will tell me the
solution.

David Turner

unread,
Oct 1, 2010, 10:47:04 AM10/1/10
to andro...@googlegroups.com
There are two ways to use ndk-build:

1/ Always give the full path to the command, e.g. $NDK/ndk-build  (that's what I do), where $NDK corresponds to the NDK's installation path
2/ Add $NDK to your path, so you won't have to do that, i.e. do the following:

export NDK=/path/to/ndk/installation
export PATH=$NDK:$PATH

Then you will be able to just type "ndk-build" without any prefix.

The same solutions work for ndk-gdb by the way.

Hope this helps

- David


--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.


bhavik patel

unread,
Oct 29, 2013, 11:50:18 PM10/29/13
to andro...@googlegroups.com, di...@android.com
Hey David,

I tried to solve issue by your answer but it's not getting solved. I'm getting same error again and again. Can you please help me for that.

TobyKaos

unread,
Nov 8, 2013, 4:21:17 AM11/8/13
to andro...@googlegroups.com
If you use eclipse with ADT and that you update your eclipse from 3.x to 4.x you can have a bug.

I simply correct this by checked in C/C++ build properties of project the Use default build command.
Reply all
Reply to author
Forward
0 new messages