简体   繁体   中英

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.

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.

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM