Giter VIP home page Giter VIP logo

cocos2d-x-3-android-template's Introduction

##Easy Run cocos2d-x-3.0 in Eclipse

New!! The code Most of this template has pull request to cocos2d-x origin, and have merged after v3.1. But you can still use it by more features.

Cocos2d-x Official's Android project template is incorrect. so,I fix it, You can easy run cocos2d-x-3.x in eclipse by two steps !!!

At first, you should download this template and replace the incorrect template at cocos2d-x-3.0/templates/cpp-template-default

You also can use it for lua/js projects by a little change.

Prerequisites:

  • Android NDK
  • Android SDK OR Eclipse ADT Bundle
  • Android AVD target installed
  • Command line Building project successed

You can read official README.md to finish it

####Step 1: C/C++ Environment Variable NDK_ROOT

  • Eclipse->Preferences->C/C++->Build->Environment.
  • Click Add button and add a new variable NDK_ROOT pointing to the root NDK directory. Example

####Step 2: Adding and running from Eclipse

Example

Import

  1. File->New->Project->Android Project From Existing Code
  2. Browse to your project directory and Add the project
  3. Click Run as Android Application to run on connected device or emulator.

That's all !!!

###Ant Build

You need download ant at first,also confim you have install correct android sdk version where target set in project.properties.

1. ./proj.android/project.properties  target
2. ./cocos2d/cocos2d/cocos/2d/platform/android/java/project.properties target

ant -file build.xml -Dsdk.dir=/Your/Android/sdk/path clean debug

Features:

  1. No errors on Editor

    closed eclipse Code Analysis's error option

  2. Perfect Indexer!

    Add two symbols at Eclipse's c++ General settings

  3. Auto find cpp files

    Android.mk can auto find cpp files from Classes and jni directory.

  4. Add libcocos2d as a link directory

    you need not to add libcocos2d any more.

  5. Support STL Indexer

    I use gun-libc++ 4.8, you can change it at Project->Properties->Paths and Symbols->Includes if you do not have this version.

To do List

  1. Android Proguard support
  2. NDK debug support

You can fork this template at My Github.

cocos2d-x-3-android-template's People

Contributors

myourys avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.