mac cocos2dx android

知识养成了思想,思想同时又在融化知识。这篇文章主要讲述mac cocos2dx android相关的知识,希望能为你提供帮助。
1.
localhost:proj.android mxhd4$ ./build_native.sh 

报错
Compile++ thumb   : cocosdenshion_static < = SimpleAudioEngine.cpp /Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../CocosDenshion/android/SimpleAudioEngine.cpp: In constructor ‘CocosDenshion::SimpleAudioEngine::SimpleAudioEngine()‘: /Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../CocosDenshion/android/SimpleAudioEngine.cpp:159:2: error: format not a string literal and no format arguments [-Werror=format-security] cc1plus: some warnings being treated as errors make: *** [obj/local/armeabi/objs-debug/cocosdenshion_static/SimpleAudioEngine.o] Error 1
make: Leaving directory `/Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android‘

解决方法:vi   /Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../CocosDenshion/android/SimpleAudioEngine.cpp
      line  :159 凝视
2.
localhost:proj.android mxhd4$ ./build_native.sh 
报错
Compile++ thumb   : cocosdenshion_static < = SimpleAudioEngine.cpp
Compile++ thumb   : cocosdenshion_static < = OpenSLEngine.cpp
/Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../CocosDenshion/android/opensl/OpenSLEngine.cpp: In function ‘bool initAudioPlayer(AudioPlayer*, char const*)‘:
/Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../CocosDenshion/android/opensl/OpenSLEngine.cpp:292:45: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
/Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../CocosDenshion/android/opensl/OpenSLEngine.cpp:292:45: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
/Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../CocosDenshion/android/opensl/OpenSLEngine.cpp: In member function ‘void OpenSLEngine::createEngine(void*)‘:
/Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../CocosDenshion/android/opensl/OpenSLEngine.cpp:324:3: error: format not a string literal and no format arguments [-Werror=format-security]
cc1plus: some warnings being treated as errors
make: *** [obj/local/armeabi/objs-debug/cocosdenshion_static/opensl/OpenSLEngine.o] Error 1
make: Leaving directory `/Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android‘
  解决方法:vi  /Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../CocosDenshion/android/opensl/OpenSLEngine.cpp
  line:324:凝视
3.
localhost:proj.android mxhd4$ ./build_native.sh
报错
Compile++ thumb   : cocosdenshion_static < = OpenSLEngine.cpp
/Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../CocosDenshion/android/opensl/OpenSLEngine.cpp: In function ‘bool initAudioPlayer(AudioPlayer*, char const*)‘:
/Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../CocosDenshion/android/opensl/OpenSLEngine.cpp:292:45: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
/Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../CocosDenshion/android/opensl/OpenSLEngine.cpp:292:45: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
Compile++ thumb   : cocosdenshion_static < = SimpleAudioEngineOpenSL.cpp
/Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../CocosDenshion/android/opensl/SimpleAudioEngineOpenSL.cpp: In member function ‘bool SimpleAudioEngineOpenSL::initEngine()‘:
/Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../CocosDenshion/android/opensl/SimpleAudioEngineOpenSL.cpp:41:5: error: format not a string literal and no format arguments [-Werror=format-security]
cc1plus: some warnings being treated as errors
make: *** [obj/local/armeabi/objs-debug/cocosdenshion_static/opensl/SimpleAudioEngineOpenSL.o] Error 1


  解决方法:vi  /Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../CocosDenshion/android/opensl/SimpleAudioEngineOpenSL.cpp:
  line:41:凝视

4.
localhost:proj.android mxhd4$ ./build_native.sh

Compile++ thumb   : cocos2dx_static < = CCCommon.cpp
/Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../cocos2dx/platform/android/CCCommon.cpp: In function ‘void cocos2d::CCLog(char const*, ...)‘:
/Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../cocos2dx/platform/android/CCCommon.cpp:44:72: error: format not a string literal and no format arguments [-Werror=format-security]
cc1plus: some warnings being treated as errors

make: *** [obj/local/armeabi/objs-debug/cocos2dx_static/platform/android/CCCommon.o] Error 1

  解决方法:vi  /Users/mxhd4/Movies/2.0.4/cocos2d-2.0-x-2.0.4/test_cocos2dx_mac/proj.android/../../cocos2dx/platform/android/CCCommon.cpp
  line:44:凝视


5.
将res     Icon.png拷贝到项目对应文件夹中,
将cocos2dx/platform/android/java/org文件夹复制一份到项目project的src对应文件夹中
buildpath   remove Android Dependency

mac cocos2dx android

文章图片




【mac cocos2dx android】
mac cocos2dx android

文章图片



































    推荐阅读