构建ndk库时出错

时间:2012-07-26 17:21:06

标签: android eclipse android-ndk cygwin

我有一个带有原生部分的android项目。现在我试图让eclipse编译所有东西,但在本机编译期间它给了我这个错误:

sh ndk-build all 
ERROR: You are using a non-Cygwin compatible Make program.
Currently using: C:/cygwin/bin/make

To solve the issue, follow these steps:

1. Ensure that the Cygwin 'make' package is installed.
   NOTE: You will need GNU Make 3.81 or later!

2. Define the GNUMAKE environment variable to point to it, as in:

     export GNUMAKE=/usr/bin/make

3. Call 'ndk-build' again.

现在我可以从Cygwin编译它并且它可以工作。它也可以在我的另一台计算机上使用eclipse完全相同的路径。

我发现如果我从cygwin发起ndk-build就可以了,但是如果我启动“sh ndk-build”它会给我一个eclipse的错误。

我认为这是问题所在,但我不知道为什么在sh前面加上命令它不起作用(也用bash作为前缀给我错误)。

有人可以帮忙吗?

提前谢谢。

1 个答案:

答案 0 :(得分:13)

问题解决了, 在eclipse首选项中没有正确设置ndk路径。 (在eclipse Window-> preferences-> Android-> NDK-> NDK_Location)