user485498
user485498

Reputation:

Configuring Cygwin Path variable to find Android NDK

I am attempting to set up my PC to use the Android NDK for my projects. I have Cygwin installed. And I downloaded the Android NDK. Let's say I put the NDK in the following folder on my PC:

c:\Android_ndk\<android ndk folder in here>

How can I configure Cygwin's path to find the ndk? I am thinking the following may be partially correct:

export PATH=$PATH:/cygdrive/C/Android_ndk/<android ndk folder in here>

However I am not even sure I have my slashes the right way round.

Upvotes: 4

Views: 6674

Answers (3)

wolfz
wolfz

Reputation: 163

add such code in .bashrc

 NDK=D:/android/android-ndk-r9
 PATH=${NDK}:$PATH
 ANT=C:/bin/apache-ant-1.9.2
 PATH=${ANT}/bin:$PATH
 export PATH NDK

Upvotes: 0

Alex Cohn
Alex Cohn

Reputation: 57173

With latest NDK r8b you don't need cygwin at all! Use ndk-build.cmd from Windows command line or in eclipse.

Upvotes: 4

Sreejith Krishnan R
Sreejith Krishnan R

Reputation: 1234

Goto ..\cygwin\home\Eclipse. You will find a file named .bashrc. Open it using notepad and at the end of the file add

export PATH=$PATH:/cygdrive/c/Android_ndk/<android ndk folder in here>

If you have done everything correctly the on issuing which ndk-build command on cygwin terminal will give you

/cygdrive/c/Android_ndk/<android ndk folder in here>/ndk-build

Hope this helps you.

Upvotes: 6

Related Questions