Wednesday, March 3, 2010

Android NDK installation problem

Today I decided to install android NDK 1.6 . First of all I downloaded Cygwin and installed the Base package and Developer package (without the Developer package you can't use NDK). I recommend deeply the default instalation folder(C:\cygwin), but should you chose another instalation folder check if the path contains spaces. If it does you may experience some problems later. After I installed Cygwin, I opened a Cygwin terminal instance (cygwin_instalation_folder\cygwin\Cygwin.bat). From here I used cd and ls commands to navigate to the folder. Then I typed "./build/host-setup.sh" and got this ugly error.

CC : compiler check ok (gcc)
LD : linker check ok (gcc)
CXX : C++ compiler check ok (g++)
Generate : out/host/config.mk
Toolchain : Checking for arm-eabi-4.2.1 prebuilt binaries
ERROR:
It seems you do not have the correct arm-eabi-4.2.1 toolchain
binaries.
Please go to the official Android NDK web site and download the
appropriate NDK package for your platform (windows).
See http://developer.android.com/sdk/index.html
ABORTING.


I googled it and found basically nothing. The problem was the path where I extracted the NDK archive: "C:/Users/MyUser/My Documents" contains a space character. After I moved the folder directly to C: the error was gone.


$ ./build/host-setup.sh
Checking host development environment.
NDK Root : /cygdrive/c/android-ndk-windows
GNU Make : make (version 3.81)
Awk : awk
Platform : windows
Generate : out/host/config.mk
Toolchain : Checking for arm-eabi-4.2.1 prebuilt binaries

Host setup complete. Please read docs/OVERVIEW.TXT if you don't know what to do.