资源列表

  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. Ubuntu mysql

    To install mysql database in the ubuntu:    1. sudo apt-get install mysql-server 2. apt-get isntall ...

  2. Swift3.0语言教程查找字符集和子字符串

    Swift3.0语言教程查找字符集和子字符串 Swift3.0语言教程查找字符集和子字符串,在字符串中当字符内容很多时,我们就需要使用到查找字符集或者子字符串的方法.以下我们将讲解3种查找字符集和子字 ...

  3. event 内存泄漏

    组长说用event有内存泄漏的隐患..做个测试. 预留

  4. hdfs 集群间拷贝

    hadoop distcp -i hdfs://192.168.10.211:9000/fileinfo hdfs://192.168.24.46:9000/fileinfo distcp [OPTI ...

  5. oracle通过sequence定义触发器支持id的自增

    sequence:s_author_id,从1开始步幅是1,最大值是999999999 -- Create sequence create sequence S_AUTHOR_ID minvalue ...

  6. python 代码片段22

    #coding=utf-8 class AddressBookEntry(object): version=0.1 def __init__(self, name,phone): self.name ...

  7. BZOJ 2527 & 整体二分

    Byteotian Interstellar Union有N个成员国.现在它发现了一颗新的星球,这颗星球的轨道被分为M份(第M份和第1份相邻),第i份上有第Ai个国家的太空站. 这个星球经常会下陨石雨 ...

  8. BZOJ1798[Ahoi2009]Seq 维护序列seq 题解

    题目大意: 有长为N的数列,有如下三种操作形式: (1)把数列中的一段数全部乘一个值; (2)把数列中的一段数全部加一个值; (3)询问数列中的一段数的和,由于答案可能很大,你只需输出这个数模P的值. ...

  9. Android Fragment 生命周期及其API使用(建议使用自定义View替换Fragment)

    我为什么不主张使用Fragment Fragment:( Fragment就相当于一个有生命周期的View,它的生命周期被所在的Activity的生命周期管理 ) 生命周期回调说明: onAttach ...

  10. Leetcode Reverse Words in a String

    Given an input string, reverse the string word by word. For example,Given s = "the sky is blue& ...