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

时间: 2024-10-13 02:02:23

mac cocos2dx android的相关文章

Mac系统cocos2dx + android 开发环境配置

Mac系统cocos2dx + android 开发环境配置 /****************************************************** 这遍文章主要转载自:http://www.cnblogs.com/wt616/p/3758828.html(这位大哥真的很牛,谢谢!) 然后,文章中又加入了一些自己的理解以及在实际操作过程中遇到问题的解决办法.而这些办法也是来自于伟大 的网友,但由于搜索的比较多,很多出处地址都没有记录好,抱歉,若你们看到,告诉我,我再加上地

cocos2dx Android 使用ant 批量打包

参考文章: 例子:http://www.2cto.com/kf/201305/208139.html http://blog.csdn.net/ljb_blog/article/details/12709983 eclipse 如何支持ant:http://www.cnblogs.com/sw926/p/3238512.html 环境介绍: 引擎:cocos2dx2.2.2 开发平台:mac jdk 1.7 注:参考了以上文章,最后发现打包也不用自己下ant,也不用命令行, 而是设置 <proj

How to use CCache to speed up cocos2d-x android compilation

CCache is a compiler cache for C/C++. It speeds up recompilation by caching the result of previous compilations and detecting when the same compilation is being done again. We can use this tool to speed up cocos2d-x android compilation. The following

windows下(免cygwin)Eclipse调试C++(Cocos2dx Android )

原文链接: http://www.cnblogs.com/zouzf/p/4202537.html 先说windows下的,mac下的在最后 环境:win8.1.java 1.5.Eclipse 4.3.1.ADT bundle 22.6.2.v20140321.NDK r8e.cocos2dx 2.2.3 前提:下载好cocos2dx.NDK(r8e以上版本可以不装cygwin) .ADT bundle(带Eclipse.sdk等各种插件),配置好 JAVA_HOME.CLASSPATH.ND

如何用ccache加速cocos2d-x android版本的编译

以下步骤在MAC下测试通过: 首先是安装CCache, 可以用homebrew brew install --HEAD ccache 也可以用源码安装 git clone https://github.com/jrosdahl/ccache.git cd ccache ./autogen.sh ./configure make make install 如果提示autoheader找不到,要先装个automake brew install automake 当然,如果提示brew找不到,要先装一

window7下 cocos2dx android交叉编译环境部署小结

上周被android交叉编译搞惨了,还好最后弄好了,写个小结以后备用吧. 步骤,1.下载cygwin的devel和shells模块 2. 2.设置环境变量 a.设置NDK_ROOT b.设置Path 编辑Path,在后面追加4个环境变量,以;号隔开(别忘了给前面的加上;),4个分别是android的sdk的platform-tools,android的sdk的tools,   cygwin的bin,上面添加的NDK_ROOT C:\Work\adt-bundle-windows-x86_64-2

Mac下Android studio 之NDK配置教程

Mac下Android studio 之NDK配置教程(一) 1.概述 最近项目全线转移到Mac下使用使用Android studio开发.遇到关键代码封装到 ***native***层,此时在win下的NDK配置步骤全部失效. 为此,花费了大量时间用来查阅资料,在此,记录下来,分享给大家供以后配置中作为参考. 2.环境 本人使用的开发配置 是:MAC OS 10.10 +androioid studio 1.2+android-ndk-r10e-darwin-x86_64+git .其他配置类

cocos2dx android mk解释

LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) #编译库的名称 LOCAL_MODULE := cocos2dcpp_shared #编译库的文件名 LOCAL_MODULE_FILENAME := libcocos2dcpp #包含的源文件 LOCAL_SRC_FILES := hellocpp/main.cpp \ ../../Classes/AppDelegate.cpp \ ../../Classes/Card.cpp \ ../..

MAC下Android的Eclipse开发环境的搭建

一.Eclipse的下载 到网站:http://www.eclipse.org/downloads/ 上,由于我们是用Java开发的所以步骤如下: 找到"Eclipse IDE for java Developers"此处右上角会根据你当前使用的系统自动选择,Mac下就会自动选择位"Mac OS X(Cocoa)" 然后点击右边的"Mac OS X 64bit"(这里我的Pro是i5处理器可以用64位的),根据你的机器也可以选择"Mac