Setting Cygwin Path variable to search for Android NDK

I am trying to configure my PC to use the Android NDK for my projects. I have Cygwin installed. And I downloaded 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 path to search for ndk? I think the following may be partially correct:

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

However, I'm not even sure that I have my own trait in the right direction.

+4
source share
3 answers

Go to ..\cygwin\home\Eclipse . You will find a file called .bashrc . Open it with notepad and add at the end of the file

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

If you did everything correctly, when you issue the command which ndk-build on the cygwin terminal, you will get

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

Hope this helps you.

+6
source

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

+4
source

add such code to .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 
0
source

Source: https://habr.com/ru/post/1434553/


All Articles