This section describes how to set up Android ndk in a Windows development environment.
1. Download ndk and cygwin
Ndk: http://dl.google.com/android/ndk/android-ndk-r8b-windows.zip
Currently updated to r8b.
Cygwin: http://cygwin.com/setup.exe
2. Extract the ndk to a disk.
3. Install cygwin
Click the cygwin.exe File
The following page is displayed:
Click Next
If you have not downloaded the package, select the second one to download the installation file, or use the first online installation, but it is very slow.
Because everything is downloaded in advance, the third item is selected.
Click Next
Select the installation location and click Next.
Find the downloaded Installation File directory and click Next.
Change the two marked in the red box to the install status, and then click Next.
Finally, the installation is successful.
There is a shortcut on the desktop
Open the cygwin Terminal
Enter make-version
If the following page shows a version number, the installation is successful.
4. Configure ndk Environment Variables
Configure the ndk decompressed directory to cygwin's environment variable.
There is a frofile under the etc directory of cygwin's installation directory,
Add the ndk directory to the path
/Cygdrive/G/ndk/android-ndk-r7b
G: indicates your windows drive letter. In fact, this is the ing between cygwin and your windows disk path.
In Linux, the environment variable Delimiter is a colon:
Save the modification and restart cygwin,
Enter the ndk-build command. The following interface indicates that the configuration is successful.