2009年7月21日 星期二

Installing Android NDK on Ubuntu 8.04

1. Get NDK from here: http://developer.android.com/sdk/ndk/1.5_r1/index.html

2. Follow the instruction on setting it up.

3. On my Ubuntu PC, it has the following problem:

pfeng@pfeng-uatu:~/android-ndk$ ./build/host-setup.sh
./build/host-setup.sh: 23: source: not found
Detecting host toolchain.

./build/host-setup.sh: 57: force_32bit_binaries: not found
./build/host-setup.sh: 58: setup_toolchain: not found
./build/host-setup.sh: 60: cannot create : Directory nonexistent
Can't create directory for host config file: out/host

4. It appears that a bash command: source is used. However, on Ubuntu, due to performance reason, /bin/sh is now linked to /bin/dash, not /bin/bash, fro details, see https://wiki.ubuntu.com/DashAsBinSh.

5. So I have to modify ./build/host-setup.sh, from #!/bin/sh to #!/bin/bash. It works like a charm!

沒有留言:

張貼留言