3

可能重复:
如何在 Windows 7 中构建 android 独立工具链

我正在尝试按照“docs\STANDALONE-TOOLCHAIN.html”使用 ndk 8 为 mips 构建独立工具链,但是当我运行以下命令时

make-standalone-toolchain.sh --platform=android-14 --install-dir=/tmp/my-android-toolchain

在命令提示符中我得到了诸如找不到命令等错误。错误详细信息如下:

./../core/ndk-common.sh: line 21: basename: command not found
./../core/ndk-common.sh: line 324: expr: command not found
./dev-defaults.sh: line 34: head: command not found
./prebuilt-common.sh: line 186: expr: command not found
./prebuilt-common.sh: line 187: expr: command not found
./prebuilt-common.sh: line 159: name: No such file or directory
./prebuilt-common.sh: line 159: OPTIONS_abstract_Specify: command not found
./prebuilt-common.sh: line 186: expr: command not found
./prebuilt-common.sh: line 187: expr: command not found
./prebuilt-common.sh: line 159: name: No such file or directory
./prebuilt-common.sh: line 159: OPTIONS_abstract_Specify: command not found
./prebuilt-common.sh: line 186: expr: command not found
./prebuilt-common.sh: line 187: expr: command not found
./prebuilt-common.sh: line 159: path: No such file or directory
./prebuilt-common.sh: line 159: path: No such file or directory
./prebuilt-common.sh: line 159: OPTIONS_default_.=: command not found
./prebuilt-common.sh: line 186: expr: command not found
./prebuilt-common.sh: line 187: expr: command not found
./prebuilt-common.sh: line 159: name: No such file or directory
./prebuilt-common.sh: line 159: OPTIONS_abstract_Specify: command not found
./prebuilt-common.sh: line 159: OPTIONS_default_Workstation: command not found
./prebuilt-common.sh: line 186: expr: command not found
./prebuilt-common.sh: line 187: expr: command not found
./prebuilt-common.sh: line 159: path: No such file or directory
./prebuilt-common.sh: line 159: path: No such file or directory
./prebuilt-common.sh: line 159: OPTIONS_default_/tmp/ndk-=: No such file or dire
ctory
./prebuilt-common.sh: line 186: expr: command not found
./prebuilt-common.sh: line 187: expr: command not found
./prebuilt-common.sh: line 159: path: No such file or directory
./prebuilt-common.sh: eval: line 159: unexpected EOF while looking for matching
`''
./prebuilt-common.sh: eval: line 160: syntax error: unexpected end of file
./prebuilt-common.sh: line 186: expr: command not found
./prebuilt-common.sh: line 187: expr: command not found
./prebuilt-common.sh: line 159: name: No such file or directory
./prebuilt-common.sh: line 159: OPTIONS_abstract_Specify: command not found
./prebuilt-common.sh: line 159: OPTIONS_default_android-3=: command not found
./prebuilt-common.sh: line 341: expr: command not found
./prebuilt-common.sh: line 354: expr: command not found
./prebuilt-common.sh: line 362: expr: command not found
./prebuilt-common.sh: line 370: expr: command not found
./prebuilt-common.sh: line 378: expr: command not found
4

1 回答 1

0

请安装 cygwin (http://cygwin.com/) 或 MinGW (http://mingw.org/),包括 MSYS 系统。确保 expr.exe 存在于cygwin/MSYS的bin目录中。如果没有,请使用 cygwin/MinGW setup 安装相应的包。

然后从 Cygwin/MinGW shell 运行配置脚本。

于 2012-06-10T08:09:19.337 回答