在Windows 8上的cocos 2dx游戏开发环境设置中出错

时间:2014-01-19 10:52:21

标签: android c++ android-ndk cocos2d-x

您好我是cocos 2d-x的新手程序员。我以前用c / c ++编程。 我面临的问题是我根据文档设置环境但是当我在项目中导入proj.android文件夹时出现错误,指出:     * Android NDK:正在中止。 。停止。

请帮忙解决这个问题。 控制台中显示的错误是:

        09:48:41 **** Incremental Build of configuration Default for project HelloCpp ****
bash C:/Users/Lapi-1/workspace/HelloCpp/build_native.sh 
NDK_ROOT = C:\Users\Lapi-1\Desktop\WORKANDDEVELOPMENT\android-ndk-r8e
COCOS2DX_ROOT = /c/Users/Lapi-1/workspace/HelloCpp/../../..
APP_ROOT = /c/Users/Lapi-1/workspace/HelloCpp/..
APP_ANDROID_ROOT = /c/Users/Lapi-1/workspace/HelloCpp
Using prebuilt externals
Android NDK: WARNING: Ignoring unknown import directory: /c/Users/Lapi-  1/workspace/HelloCpp/../../../cocos2dx/platform/third_party/android/prebuilt    
jni/Android.mk:23: *** Android NDK: Aborting.    .  Stop.
Android NDK: jni/Android.mk: Cannot find module with tag 'cocos2dx' in import path    
Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?    
Android NDK: The following directories were searched:    
Android NDK:         
make.exe: Entering directory `/c/Users/Lapi-1/workspace/HelloCpp'
make.exe: Leaving directory `/c/Users/Lapi-1/workspace/HelloCpp'

09:48:47 Build Finished (took 5s.798ms)

1 个答案:

答案 0 :(得分:0)

在构建入门教程的过程中构建cpp-tests时,这种情况恰好发生在我身上。 (http://www.cocos2d-x.org/wiki/How_to_run_cpp-tests_on_Android供参考)。我也有Windows 8。

就我而言,我通过GitHub进行的cocos2d-x checkout显然是不完整的,并且缺少一些文件(例如我的freetype2目录)。我从网站上下载了打包的zip,解决了这个问题。也许您的问题源于安装中丢失的文件。

从命令提示符

错误日志:

Android NDK: C:\Users\username\Documents\GitHub\cocos2d-x\build\../cocos/./Android.mk: Cannot find module with tag 'freetype2/prebuilt/android' in import path
Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?
Android NDK: The following directories were searched:
Android NDK:
make.exe: Entering directory `C:/Users/username/Documents/GitHub/cocos2d-x/tests/cpp-tests/proj.android'
C:\Users\username\Documents\GitHub\cocos2d-x\build\../cocos/./Android.mk:218: *** Android NDK: Aborting.    .  Stop.
make.exe: Leaving directory `C:/Users/username/Documents/GitHub/cocos2d-x/tests/cpp-tests/proj.android'
Build dynamic library for project [ C:\Users\username\Documents\GitHub\cocos2d-x\build\..\tests/cpp-tests/proj.android ] fails!

下载页面的链接:http://www.cocos2d-x.org/download

希望有所帮助!

干杯,

布拉德