![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
android eclipse c++ cocos2d
ningcaicheng
这个作者很懒,什么都没留下…
展开
-
从create-android-project.bat开始创建eclipse下可调试的cocos2dx c++工程
第一步:双击运行cocos2dx下的create-android-project.bat,此时提示:Please enter your package path. For example: org.cocos2dx.example:输入:com.test 回车提示:Please enter your project name:输入test回车提示:Please input原创 2014-12-09 21:15:39 · 945 阅读 · 0 评论 -
编译vs2010 工程出unresolved external symbol __ultod3
错误 358 error LNK2001: unresolved external symbol __ultod3 D:\nproj\gjifull\Code_Client\2.140.0\Game\proj.win32\libExtensions.lib(DictionaryHelper.obj)Game这是因为一个解决方案有多个工程有的使用了vs2013的项目属性,有的使用了v原创 2015-11-18 21:13:39 · 1647 阅读 · 0 评论 -
error: format not a string literal and no format arguments
使用android studio, 如果编译jni过程出现如下错误:error: format not a string literal and no format arguments [-Werror=format-security]解决方法:在你的ndk目录下修改build/core/default-build-commands.mkTARGET_FORMAT_STRING_C转载 2016-01-19 10:55:44 · 910 阅读 · 0 评论 -
一个穿透事件问题的解决
自定义类CCBContainer继承关系改为public CCLayerclass CCBContainer :public CCLayer//: public cocos2d::CCNodeonTouchBegan return true使得eventdispath 能够根据swallowstouches标志中断后续的事件分发bool CCBContainer::init原创 2016-01-28 14:57:43 · 1710 阅读 · 0 评论 -
apk打包中程序包R不存在的问题
一个工程中有src下有2个packaget,com,org当com中的代码没有import org.cocos2dx.lua.R;就会出现 错误: 程序包R不存在把import语句加上去解决问题原创 2016-01-14 18:07:06 · 2961 阅读 · 0 评论 -
cocos ide 出现lua语句不执行的bug
cocos lua调试ide有bug一个工程永久了,会出现有的lua语句不执行的情况但是vc++ 环境中运行却是正常的,解决办法是把 cocos ide 工程相关的配置文件都删除了工程文件配置的路径大概是这样的D:\cocos_doc\.metadata\.plugins\org.eclipse.core.resources\.projects原创 2016-03-24 09:42:01 · 373 阅读 · 0 评论 -
box2djs 一个bug world.Step运行数秒钟的调试记录
在项目中用到box2d动态增加了一个刚体,并设置了刚体的位置bd.SetPosition(x,y);结果游戏循环被卡死调试后发现world.Step这个函数和正常的情况相比,执行速度非常慢,要几秒钟才运行结束单步调试该函数函数体内的代码片段如下 if (step.dt > 0.0) { this.Solve(step); }原创 2016-08-17 20:51:52 · 1297 阅读 · 0 评论 -
cocos2dx3.4 打包apk黑屏,发现glvert无限增长的一个bug
MainScene.lua中local MainScene = class("MainScene", cc.load("mvc").ViewBase)--local socket=require("socket") --导入socket库是个罪魁祸首,注释掉这个现象就消失,不知具体原因是什么function MainScene:onCreate() -- add原创 2015-10-13 21:53:24 · 1648 阅读 · 1 评论 -
cocos2dx lua让print 在andriod 输出log的方法
1.在cpp工程中搜索print( 定位到 int lua_print(lua_State * luastate),这个地方就是 lua中print函数的api2.修改该函数int lua_print(lua_State * luastate){ int nargs = lua_gettop(luastate); std::string t;原创 2015-10-14 20:47:31 · 9127 阅读 · 3 评论 -
cocos ide 出现连接ide超时的原因和解决办法
当ide错误日志显示Internal error logged from DLTKDebugPlugin: Address already in use: JVM_Bind然后大约30秒左右IDE连接超时,无法对程序下断点调试原因:10000端口被占用解决办法:windows cmd命令行下输入 netstat -ano| findstr "10000"就可以查看到占用这个端口原创 2015-08-11 23:06:29 · 2238 阅读 · 2 评论 -
have you declared this activity in your AndroidManifest.xml 解决办法
我的工程中有一个包com.example.iceyousdk 当 使用 it.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); it.setClassName("com.example.iceyousdk", "com.example.iceyousdk.LoginActivity"); mCon原创 2015-08-26 11:56:32 · 11324 阅读 · 0 评论 -
cocosx3.4 建立的工程导入coco ide 1.20无法打包apk的原因
新工程下.settings 里的配置文件version.json内容为{ "templateVersion": "1.9", "runtimeVersion": "1.9", }这是缺失的文件内容修改为{ "ideVersion": "1.2.0", "templateVersion": "1.9", "runtimeVers原创 2015-09-01 09:56:27 · 537 阅读 · 0 评论 -
cocos2dx tolua c++
E:\source\client\core\frameworks\runtime-src\Classes\lua-stub里面的stub.cpp就是给lua调用的 Stub.cppStub.hE:\source\client\core\frameworks\cocos2d-x\tools\tolua里面的Stub.py就是它的tolua脚本生成之后的文件放到E:\source\cl原创 2015-09-01 14:05:15 · 989 阅读 · 0 评论 -
luajavabridge 使用过程出现问题的总结
sig 函数参数表说明一定要写正确否则调用的过程会出现Failed to find method id 错误,jvm查找不到函数idpackage com.cocos2dx.sample.LuaJavaBridgeTest;import org.cocos2dx.lib.Cocos2dxLuaJavaBridge;public class LuaJavaBridgeTest{原创 2015-08-19 09:54:28 · 2570 阅读 · 0 评论 -
android-19 编译导致aapt.exe 停止工作
原因:资源文件中出现错误 app:showAsAction="never"把这行去掉,19版本不支持这个语句,android开发的兼容性真的很差 xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" tools原创 2015-09-02 17:56:47 · 763 阅读 · 0 评论 -
cocos3.4 lua 工程打包为apk后运行一段时间闪退的问题
根本原因是ndk版本问题,android-ndk-r9d-windows-x86版本 cocos compile -p android -m debug --ndk-mode debug 会出现 error: undefined reference to 'std::__stl_throw_length_error(char const*)' error: undefined refe原创 2015-10-18 21:04:29 · 1592 阅读 · 0 评论 -
一个加班到凌晨2点多的bug
多人协同svn工作时,提交新版本文件,遗漏了一个文件的更新,导致下面lua代码出错DataWarehouse:getInstance():setPlay365LonginInfo(pid,uid) --在一个文件中间增加的函数,但是没有提交,导致这里执行失败,并且lua没有提示函数为nil的错误 InteractLogin:getInstance():loginAccountCenera原创 2015-10-27 18:59:46 · 1391 阅读 · 0 评论 -
cocosjs 绑定c++中遇到的坑
第一个坑custom/autoTraceback (most recent call last): File "D:\h\jsdemo\tools\tojs\genbindings.py", line 174, in main() File "D:\h\jsdemo\tools\tojs\genbindings.py", line 155, in main原创 2017-01-21 17:48:12 · 882 阅读 · 0 评论