导入cocos2dx android示例项目但显示错误(mac osx)

时间:2014-02-07 14:38:07

标签: cocos2d-x

导入cocos2dx android示例项目但显示错误

在构建项目时,它表示存在错误

有没有人遇到同样的问题?

enter image description here

构建信息

**** Build of configuration Default for project MoonWarriors ****

bash /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/build_native.sh 
The Selected NDK toolchain version was 4.7 !

Paths
    NDK_ROOT = /Users/mymac/cd-standard/android-ndk-r8e
    COCOS2DX_ROOT = /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../..
    APP_ROOT = /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/..
    APP_ANDROID_ROOT = /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android

Using prebuilt externals

+ /Users/mymac/cd-standard/android-ndk-r8e/ndk-build -C /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android NDK_MODULE_PATH=/Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../..:/Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../cocos2dx/platform/third_party/android/prebuilt NDK_LOG=1 V=1
HOST_OS=darwin
HOST_ARCH=x86_64
HOST_TAG=darwin-x86_64 
GNUMAKE=/Users/mymac/cd-standard/android-ndk-r8e/prebuilt/darwin-x86_64/bin/make (NDK prebuilt)
Android NDK: NDK installation path auto-detected: '/Users/mymac/cd-standard/android-ndk-r8e'
Android NDK: GNU Make version 3.81 detected
Android NDK: Host OS was auto-detected: darwin
Android NDK:  Host operating system detected: darwin
Android NDK: Host CPU was auto-detected: x86
Android NDK: HOST_TAG set to darwin-x86
Android NDK: Host tools prebuilt directory: /Users/mymac/cd-standard/android-ndk-r8e/prebuilt/darwin-x86_64/bin
Android NDK: Host 'echo' tool: echo
Android NDK: Host 'echo -n' tool: printf %s
Android NDK: Host 'cmp' tool: cmp
Android NDK: Host 'awk' tool: /Users/mymac/cd-standard/android-ndk-r8e/prebuilt/darwin-x86_64/bin/awk
Android NDK: Host 'awk' test returned: Pass
Android NDK: Found platform root directory: /Users/mymac/cd-standard/android-ndk-r8e/platforms
Android NDK: Found supported platforms: android-14 android-3 android-4 android-5 android-8 android-9
Android NDK: PLATFORM android-14 supports: arm mips x86
Android NDK:   ABI arm sysroot is: /Users/mymac/cd-standard/android-ndk-r8e/platforms/android-14/arch-arm
Android NDK:   ABI mips sysroot is: /Users/mymac/cd-standard/android-ndk-r8e/platforms/android-14/arch-mips
Android NDK:   ABI x86 sysroot is: /Users/mymac/cd-standard/android-ndk-r8e/platforms/android-14/arch-x86
Android NDK: PLATFORM android-3 supports: arm
Android NDK:   ABI arm sysroot is: /Users/mymac/cd-standard/android-ndk-r8e/platforms/android-3/arch-arm
Android NDK: PLATFORM android-4 supports: arm
Android NDK:   ABI arm sysroot is: /Users/mymac/cd-standard/android-ndk-r8e/platforms/android-4/arch-arm
Android NDK: PLATFORM android-5 supports: arm
Android NDK:   ABI arm sysroot is: /Users/mymac/cd-standard/android-ndk-r8e/platforms/android-5/arch-arm
Android NDK: PLATFORM android-8 supports: arm
Android NDK:   ABI arm sysroot is: /Users/mymac/cd-standard/android-ndk-r8e/platforms/android-8/arch-arm
Android NDK: PLATFORM android-9 supports: arm mips x86
Android NDK:   ABI arm sysroot is: /Users/mymac/cd-standard/android-ndk-r8e/platforms/android-9/arch-arm
Android NDK:   ABI mips sysroot is: /Users/mymac/cd-standard/android-ndk-r8e/platforms/android-9/arch-mips
Android NDK:   ABI x86 sysroot is: /Users/mymac/cd-standard/android-ndk-r8e/platforms/android-9/arch-x86
Android NDK: Found stable platform levels: 14 3 4 5 8 9
Android NDK: Found max platform level: 14
Android NDK:  This NDK supports the following target architectures and ABIS:
Android NDK:    arm: armeabi armeabi-v7a
Android NDK:    mips: mips
Android NDK:    x86: x86
Android NDK:  This NDK supports the following toolchains and target ABIs:
Android NDK:    arm-linux-androideabi-4.4.3:  armeabi armeabi-v7a
Android NDK:    arm-linux-androideabi-4.6:  armeabi armeabi-v7a
Android NDK:    arm-linux-androideabi-4.7:  armeabi armeabi-v7a
Android NDK:    arm-linux-androideabi-clang3.1:  armeabi armeabi-v7a
Android NDK:    arm-linux-androideabi-clang3.2:  armeabi armeabi-v7a
Android NDK:    mipsel-linux-android-4.4.3:  mips
Android NDK:    mipsel-linux-android-4.6:  mips
Android NDK:    mipsel-linux-android-4.7:  mips
Android NDK:    mipsel-linux-android-clang3.1:  mips
Android NDK:    mipsel-linux-android-clang3.2:  mips
Android NDK:    x86-4.4.3:  x86
Android NDK:    x86-4.6:  x86
Android NDK:    x86-4.7:  x86
Android NDK:    x86-clang3.1:  x86
Android NDK:    x86-clang3.2:  x86
Android NDK: Found project path: .
Android NDK: Ouput path: ./obj
Android NDK: Parsing ./jni/Application.mk
Android NDK:   Found APP_PLATFORM=android-18 in ./project.properties
Android NDK:   APP_PIE is 
Android NDK:   Adjusting APP_PLATFORM android-18 to android-14 and enabling -fPIE
make: Entering directory `/Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android'
/Users/mymac/cd-standard/android-ndk-r8e/build/core/add-application.mk:128: Android NDK: WARNING: APP_PLATFORM android-14 is larger than android:minSdkVersion 9 in ./AndroidManifest.xml    
Android NDK:   Defaulted to APP_BUILD_SCRIPT=./jni/Android.mk
Android NDK: Application 'local' is not debuggable
Android NDK: Selecting release optimization mode (app is not debuggable)
Android NDK: Adding import directory: /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../..
Android NDK: Adding import directory: /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../cocos2dx/platform/third_party/android/prebuilt
Android NDK: Adding import directory: /Users/mymac/cd-standard/android-ndk-r8e/sources
Android NDK: Building application 'local' for ABI 'armeabi'
Android NDK: Using target toolchain 'arm-linux-androideabi-4.7' for 'armeabi' ABI (through NDK_TOOLCHAIN_VERSION)
Android NDK: Looking for imported module with tag 'cxx-stl/gnu-libstdc++'
Android NDK:   Probing /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../cxx-stl/gnu-libstdc++/Android.mk
Android NDK:   Probing /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../cocos2dx/platform/third_party/android/prebuilt/cxx-stl/gnu-libstdc++/Android.mk
Android NDK:   Probing /Users/mymac/cd-standard/android-ndk-r8e/sources/cxx-stl/gnu-libstdc++/Android.mk
Android NDK:     Found in /Users/mymac/cd-standard/android-ndk-r8e/sources/cxx-stl/gnu-libstdc++
Android NDK: Looking for imported module with tag 'cocos2dx'
Android NDK:   Probing /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../cocos2dx/Android.mk
Android NDK:     Found in /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../cocos2dx
Android NDK: Looking for imported module with tag 'libjpeg'
Android NDK:   Probing /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../libjpeg/Android.mk
Android NDK:   Probing /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../cocos2dx/platform/third_party/android/prebuilt/libjpeg/Android.mk
Android NDK:     Found in /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../cocos2dx/platform/third_party/android/prebuilt/libjpeg
Android NDK: Looking for imported module with tag 'libpng'
Android NDK:   Probing /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../libpng/Android.mk
Android NDK:   Probing /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../cocos2dx/platform/third_party/android/prebuilt/libpng/Android.mk
Android NDK:     Found in /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../cocos2dx/platform/third_party/android/prebuilt/libpng
Android NDK: Looking for imported module with tag 'libtiff'
Android NDK:   Probing /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../libtiff/Android.mk
Android NDK:   Probing /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../cocos2dx/platform/third_party/android/prebuilt/libtiff/Android.mk
Android NDK:     Found in /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../cocos2dx/platform/third_party/android/prebuilt/libtiff
Android NDK: Looking for imported module with tag 'libwebp'
Android NDK:   Probing /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../libwebp/Android.mk
Android NDK:   Probing /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../cocos2dx/platform/third_party/android/prebuilt/libwebp/Android.mk
Android NDK:     Found in /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../cocos2dx/platform/third_party/android/prebuilt/libwebp
Android NDK: Looking for imported module with tag 'android/cpufeatures'
Android NDK:   Probing /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../android/cpufeatures/Android.mk
Android NDK:   Probing /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../cocos2dx/platform/third_party/android/prebuilt/android/cpufeatures/Android.mk
Android NDK:   Probing /Users/mymac/cd-standard/android-ndk-r8e/sources/android/cpufeatures/Android.mk
Android NDK:     Found in /Users/mymac/cd-standard/android-ndk-r8e/sources/android/cpufeatures
Android NDK: Looking for imported module with tag 'CocosDenshion/android'
Android NDK:   Probing /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../CocosDenshion/android/Android.mk
Android NDK:     Found in /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../CocosDenshion/android
Android NDK: Looking for imported module with tag 'external/chipmunk'
Android NDK:   Probing /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../external/chipmunk/Android.mk
Android NDK:     Found in /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../external/chipmunk
Android NDK: Looking for imported module with tag 'scripting/javascript/spidermonkey-android'
Android NDK:   Probing /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../scripting/javascript/spidermonkey-android/Android.mk
Android NDK:     Found in /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../scripting/javascript/spidermonkey-android
Android NDK: Looking for imported module with tag 'scripting/javascript/bindings'
Android NDK:   Probing /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../scripting/javascript/bindings/Android.mk
Android NDK:     Found in /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../scripting/javascript/bindings
Android NDK: Skipping duplicate import for module with tag 'scripting/javascript/spidermonkey-android'
Android NDK: Looking for imported module with tag 'extensions'
Android NDK:   Probing /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../extensions/Android.mk
Android NDK:     Found in /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../extensions
Android NDK: Skipping duplicate import for module with tag 'cocos2dx'
Android NDK: Skipping duplicate import for module with tag 'CocosDenshion/android'
Android NDK: Looking for imported module with tag 'cocos2dx/platform/third_party/android/prebuilt/libcurl'
Android NDK:   Probing /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../cocos2dx/platform/third_party/android/prebuilt/libcurl/Android.mk
Android NDK:     Found in /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../cocos2dx/platform/third_party/android/prebuilt/libcurl
Android NDK: Looking for imported module with tag 'external/Box2D'
Android NDK:   Probing /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../external/Box2D/Android.mk
Android NDK:     Found in /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../external/Box2D
Android NDK: Skipping duplicate import for module with tag 'external/chipmunk'
Android NDK: Looking for imported module with tag 'external/libwebsockets/android'
Android NDK:   Probing /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../external/libwebsockets/android/Android.mk
Android NDK:     Found in /Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android/../../../../external/libwebsockets/android
Android NDK: Module 'box2d_static' has C++ sources
Android NDK: Add dependency 'gnustl_static' to module 'box2d_static'
Android NDK: Module 'cocos2dx_static' has C++ sources
Android NDK: Add dependency 'gnustl_static' to module 'cocos2dx_static'
Android NDK: Module 'cocos_extension_static' has C++ sources
Android NDK: Add dependency 'gnustl_static' to module 'cocos_extension_static'
Android NDK: Module 'cocosdenshion_static' has C++ sources
Android NDK: Add dependency 'gnustl_static' to module 'cocosdenshion_static'
Android NDK: Module 'moonwarriors_shared' has C++ sources
Android NDK: Add dependency 'gnustl_static' to module 'moonwarriors_shared'
Android NDK: Module 'scriptingcore-spidermonkey' has C++ sources
Android NDK: Add dependency 'gnustl_static' to module 'scriptingcore-spidermonkey'
rm -f ./libs/armeabi/lib*.so ./libs/armeabi-v7a/lib*.so ./libs/mips/lib*.so ./libs/x86/lib*.so
rm -f ./libs/armeabi/gdbserver ./libs/armeabi-v7a/gdbserver ./libs/mips/gdbserver ./libs/x86/gdbserver
rm -f ./libs/armeabi/gdb.setup ./libs/armeabi-v7a/gdb.setup ./libs/mips/gdb.setup ./libs/x86/gdb.setup
Install        : libmoonwarriors.so => libs/armeabi/libmoonwarriors.so
install -p ./obj/local/armeabi/libmoonwarriors.so ./libs/armeabi/libmoonwarriors.so
/Users/mymac/cd-standard/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-strip --strip-unneeded  ./libs/armeabi/libmoonwarriors.so
make: Leaving directory `/Users/mymac/cd-standard/cocos2d-x-3.0alpha0-pre/samples/Javascript/MoonWarriors/proj.android'

**** Build Finished ****

和最终结果

enter image description here

enter image description here

1 个答案:

答案 0 :(得分:0)

转到项目 - >属性 - > eclipse项目的Android,并在右下方正确添加/编辑cocos2d-x的库路径。