2014-06-13

Install Android NDK on Windows

1. Download Android NDK

  • Download latest version of NDK from http://developer.android.com/tools/sdk/ndk/index.html 
  • Decompress it and put NDK folder anywhere you want. For my example: D:\SDK\android-ndk-r9d
2. Install CDT for Eclipse
  • Open Eclipse, Help-->Install New Software
  • Press "Add"
  • Name: CDT(whatever you want), Location: http://download.eclipse.org/tools/cdt/releases/kepler
  • Check "CDT Main features"
  • Press Next to install.
3. Install NDK Plugin for Eclipse
  • Open Eclipse, Help-->Install New Software
  • Search for https://dl-ssl.google.com/android/eclipse/ in "Work with", if you can't find one, just press "Add" to add it.
  • Check "NDK plugins"
  • Press Next to install.
4. Setup NDK
  • Restart Eclipse, if you just complete all steps above.
  • Window-->Preferences-->Android-->NDK
  • Enter the NDK decompressed path, for my example: D:\SDK\android-ndk-r9d
5. Install Cygwin
  • Download latest version of Cygwin from http://www.cygwin.com
  • Execute setup.exe you downloaded.
  • Next-->Select "Install from Internet"
  • Select your Root Directory, in my example: C:\cygwin64\
  • Next-->Local Package Directory
  • Next-->Next-->select a download server
  • Next-->Start to download and install
  • When Select Packages, please change "Devel" to "Install"
  • Next-->Finish
  • How to verify your cygwin:
A. Go to your cygwin installed path (Root Directory), for my example: C:\cygwin64\
B. Execute C:\cygwin64\cygwin.bat
make -v
You should see your GNU Make version.
gcc -v
You should see your gcc version.


Finished, you can build your JNI now!!!!!

No comments: