本人 用 cocos 建了一个hello world 工程,未添任何代码!想打包到android,用eclipse 导入工程,首先出现:
**** Build of configuration Release for project CocosV1 ****
python D:/Project/Cocos2d/CocosV1/proj.android/build_native.py -b release all
Android NDK: WARNING: APP_PLATFORM android-17 is larger than android:minSdkVersion 9 in ./AndroidManifest.xml
Android NDK: WARNING: Ignoring unknown import directory: jni/…/…/cocos2d
Android NDK: WARNING: Ignoring unknown import directory: jni/…/…/cocos2d/external
jni/Android.mk:25: *** Android NDK: Aborting. . Stop.
Android NDK: WARNING: Ignoring unknown import directory: jni/…/…/cocos2d/cocos
Android NDK: jni/Android.mk: Cannot find module with tag ‘./prebuilt-mk’ 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 D:/Project/Cocos2d/CocosV1/proj.android' make.exe: Leaving directory D:/Project/Cocos2d/CocosV1/proj.android’
The Selected NDK toolchain version was 4.8 !
Traceback (most recent call last):
File “D:/Project/Cocos2d/CocosV1/proj.android/build_native.py”, line 159, in
build(opts.ndk_build_param,opts.android_platform,opts.build_mode)
File “D:/Project/Cocos2d/CocosV1/proj.android/build_native.py”, line 146, in build
do_build(cocos_root, ndk_root, app_android_root,ndk_build_param,sdk_root,android_platform,build_mode)
File “D:/Project/Cocos2d/CocosV1/proj.android/build_native.py”, line 82, in do_build
raise Exception(“Build dynamic library for project " + app_android_root + " ] fails!”)
Exception: Build dynamic library for project D:\Project\Cocos2d\CocosV1\proj.android ] fails!
**** Build Finished ****
,各种查资料,原来是要把cocos 引擎目录下的cocos2d-x文件夹复制到自己的工程目录下并改名为cocos2d,用eclipse 再次编译,未提示任何错误,可是就是没有生成APK:
**** Build of configuration Release for project CocosV1 ****
python D:/Project/Cocos2d/CocosV1/proj.android/build_native.py -b release all
Android NDK: WARNING: APP_PLATFORM android-17 is larger than android:minSdkVersion 9 in ./AndroidManifest.xml
Android NDK: WARNING:jni/Android.mk:cocos2dcpp_shared: non-system libraries in linker flags: -lc++_static
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
Android NDK: WARNING: Unsupported source file extensions in jni/…/…/cocos2d/cocos/./prebuilt-mk/Android.mk for module cocos2dx_static
Android NDK: …/…/prebuilt/android/armeabi/libcocos2d.a
make.exe: Entering directory D:/Project/Cocos2d/CocosV1/proj.android' StaticLibrary : libcocos2d.a Compile++ thumb: cocos2dcpp_shared <= main.cpp Compile++ thumb: cocos2dcpp_shared <= AppDelegate.cpp Compile++ thumb: cocos2dcpp_shared <= HelloWorldScene.cpp Compile thumb : cpufeatures <= cpu-features.c StaticLibrary : libcpufeatures.a SharedLibrary : libcocos2dcpp.so Install : libcocos2dcpp.so => libs/armeabi/libcocos2dcpp.so make.exe: Leaving directory D:/Project/Cocos2d/CocosV1/proj.android’
The Selected NDK toolchain version was 4.8 !
,简直是泪奔了。。。搞了3天了,到底有没有人 在cocosV1 priview 中打包成功过。