Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
.externalToolBuilders
.settings
assets
gen/cn/sharesdk/hellocpp
jni
libs
res
src
.classpath
.cproject
.project
AndroidManifest.xml
README.md
ant.properties
build-cfg.json
build.xml
build_native.py
lint.xml
local.properties
proguard-project.txt
project.properties

README.md

Prerequisites:

  • Android NDK
  • Android SDK OR Eclipse ADT Bundle
  • Android AVD target installed

Building project

There are two ways of building Android projects.

  1. Eclipse
  2. Command Line

Import Project in Eclipse

####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
  • Only for Windows: Add new variables CYGWIN with value nodosfilewarning and SHELLOPTS with value igncr

####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 !!!

Running project from Command Line

$ cd NEW_PROJECTS_DIR/MyGame
$ cocos run -p android -j 4