资源列表

  1. 官网上下载最新的cocos2d-x-3.3
  2. 安装JDKEclipseCDT插件ADT插件
  3. 下载Android SDK,更新。因为国内经常访问不了google,用vpn速度也有点慢。网上搜来的ip还可以用,改hosts文件。210.242.125.108    dl-ssl.google.com
  4. 下载NDK
  5. 下载ANT
  6. 安装VS2013
  7. 安装python 2.7

最终环境是:

  1. VS2013;
  2. python 2.7.8;
  3. ant-1.9.4;
  4. cocos2d-x-3.3;
  5. Eclipse Luna Service Release 1 (4.4.1);
  6. CDT 8.5.0;
  7. Android NDK, Revision 10;
  8. JDK (Java SE 8u25).

PC环境开发

命令行到cocos2d-x-3.3的目录,执行setup.py,填好ANT、NDK、SDK的安装/解压目录,结束。

用setup.py配置好Cocos2d-x的环境之后,你的命令行中就会多如“cocos”的命令,新建项目将使用这个命令进行。示例:

 cocos new hello(项目名称)-p com.hello(包名字)-l cpp(项目类型) -dF:\(目录)

进入项目目录,结构如图。

进入proj.win32,打开.sln文件(会自动关联vs2013),编译之后应该可以运行。

在这里卡了一段时间,因为实验室的机器没有独显,带的集显又不支持OpenGL,所以glfwCreateWindow返回值为null。

无奈在自己笔记本搭建环境,一步到位。

Android环境开发

eclipse的ADT插件可以导入android项目,然后run as android application就行。

模拟器的话,用2.3.3的虚拟机不能启动,会报错。java.lang.IllegalArgumentException: No configs match configSpec

主要原因见stackoverflow

This is actually part of a bigger issue, and I'm hoping that by posting here, others who have experienced this error will read this entry. I equally hope that, if any of my conclusions are incorrect, someone comes forth with a more definitive explanation and/or solution.
The core issue is OpenGL support. Beginning at 2.2, Android supports OpenGL ES 2.0, and beginning at 4.0.3, Android emulators support OpenGL ES 2.0. Code that uses OpenGL ES 2.0 will not work on emulators before 4.0.3. [Evidently, the camera switched from ES 1.0 to 2.0 at Android 2.2]
But that's not all! None of the Android docs I've encountered mention that, in order to support Open GL ES 2.0 emulation, your box's graphic card chipset and driver must support OpenGL 2.0 as well. Therefore, if you enable GPU Emulation on the AVD and you still encounter this error, do the following:

  • Find out the specs on your graphic card and visit the chipset manufacturer's web site to determine if the chipset is OpenGL 2.0 compatible. If it isn't, you're S.O.L. and must stick to debugging through an actual Android device instead of an emulator.
  • Determine if you have the latest graphics driver for the chipset. Drivers obtained through Microsoft (if you're using Windows) typically do not support OpenGL, so you want to download the latest driver from the manufacturer.

我用了真机(HTC G10)可以跑起来;

Cocos2d-x环境搭建的更多相关文章

  1. cocos2d ios 环境搭建

    一.下载cocos2d-x http://cocos2d-x.org/projects/cocos2d-x/wiki/Download cocos2d-x-2.1.4.zip @ June.18, 2 ...

  2. Cocos2d Android 环境搭建

    1.在开始之前,需要先准备好资源如下,如果安卓开发环境有了直接装第3.4. 1.JDK      点击下载 (1.6) 2.ADT(已经自带Android SDK)点击下载 3.NDK 点击下载 4. ...

  3. Mac下搭建cocos2d 和cocos2d -x 环境

    来源:http://blog.csdn.net/duxinfeng2010/article/details/7985024 cocos2d是一个开源框架,用于构建2D游戏.演示程序和其他图形界面交互应 ...

  4. 【Cocos2d入门教程一】Cocos2d-x环境搭建

    在进行Cocos2d游戏开发前 我们先来配置一下环境,我们先来准备一下工具,我们所需要的工具分别为: 1.Cocos2d引擎 2.JDK 3.SDK 4.NDK 5.ANT 6.ADT 1.下载Coc ...

  5. cocos2d-x Android 环境搭建问题汇总

    初次接触Cocos2d-x,准备搭建一个hello world的Android环境,问题遇到很多.在此记录,为自己,也为大家,避免重走弯路! 具体的环境搭建,可以参考官方的文档.在Windows7平台 ...

  6. [wp8游戏] cocos2d-x v2.2 + VS2013 环境搭建

    [wp8游戏] cocos2d-x v2.2 + VS2013 环境搭建 by:唐小崇 http://www.cnblogs.com/tangchong 从cocos2d-x v2.1.4 以来,co ...

  7. Cocos2d-x 3.0正式版及android环境搭建

    开发环境是:mac + xcode + eclipse ,在win以下的环境和这个都是一样的,唯一不一样的就是环境变量的配置. 以下主要介绍cocos2d-x环境的设置以及android的环境搭建 1 ...

  8. eclipse开发cocos2dx 3.2环境搭建之中的一个: Android C\C++环境搭建(ndk r9d)

    这几天有时间,琢磨一下cocos2dx.cocos2d家族事实上挺庞大的.也有cocos2d-android这样的能够直接用Java语言来开发的,可是cocos2d-android资料相对少一些.并且 ...

  9. Cocos2d-X-3.0 之后的版本的环境搭建

     Cocos2d-X-3.0 之后的版本的环境搭建 由于cocos2d游戏开发引擎更新十分频繁,官方文档同步不够及时和完善.所以不要照着官方文档来照做生成工程. <点击图片就能进入网站> ...

  10. Win8.1下COCOS2D-X 3.4环境搭建

     Cocos2dx_3.4开发环境搭建,并编译成APK 第一步:须要下载的:(windows64位系统下环境搭建) Ant   apache-ant-1.9.4-bin.zip NDK   and ...

随机推荐

  1. 贪心 Codeforces Round #287 (Div. 2) A. Amr and Music

    题目传送门 /* 贪心水题 */ #include <cstdio> #include <algorithm> #include <iostream> #inclu ...

  2. C# 开发积累(1)

        EntityFramework批量增加时报"...请在调用 AcceptChanges 之前,确保键值是唯一的" http://www.xinglongjian.com/i ...

  3. POJ1637 Sightseeing tour(判定混合图欧拉回路)

    有向连通图存在欧拉回路的充要条件是所有点入度=出度. 首先随便给定所有无向边一个方向(不妨直接是u->v方向),记录所有点的度(记:度=入度-出度). 这时如果有点的度不等于0,那么就不存在欧拉 ...

  4. C#Excel的导入与导出

    1.整个Excel表格叫做工作表:WorkBook(工作薄),包含的叫页(工作表):Sheet:行:Row:单元格Cell. 2.NPOI是POI的C#版本,NPOI的行和列的index都是从0开始 ...

  5. ACM: HDU 1028 Ignatius and the Princess III-DP

     HDU 1028 Ignatius and the Princess III Time Limit:1000MS     Memory Limit:32768KB     64bit IO Form ...

  6. Code[VS]1021 玛丽卡题解

    Code[VS]1021 玛丽卡题解 SPFA Algorithm 题目传送门:http://codevs.cn/problem/1021/ 题目描述 Description 麦克找了个新女朋友,玛丽 ...

  7. 【BZOJ1088】[SCOI2005]扫雷Mine 递推

    调LCT奔溃,刷水调节一下. #include <iostream> #include <cstdio> #include <cstring> using name ...

  8. LINUX 下通过lsof恢复被误删除的文件

    当Linux计算机受到入侵时,常见的情况是日志文件被删除,以掩盖攻击者的踪迹.管理错误也可能导致意外删除重要的文件,比如在清理旧日志时,意外地删除了数据库的活动事务日志.有时可以通过lsof来恢复这些 ...

  9. Window对象简介

    Window对象是JavaScript层级中的顶层对象. Window对象表示一个浏览器窗口或一个框架,它在<body>或<frameset>出现时被自动创建. Window对 ...

  10. sublime text 3.0 安装 HTML-CSS-JS Prettify

    可能下载的最新的这个版本,修改了底层的api.在工具栏中找不到添加插件的菜单了,如图下红框这两项最开始是没有的: 找了好久的资料,找不到.然后去https://packagecontrol.io/in ...