zoukankan      html  css  js  c++  java
  • Android导入Cocos2D的Sample项目

    导入Cocos2D项目到Android的Eclipse时注意以下几点

    1. Set up Variables: 

      Eclipse->Windows->Preferences->General->Workspace->**Linked Resources**

      Click **New** button to add a Path Variable `COCOS2DX` pointing to the root cocos2d-x directory.

    2. C/C++ Environment Variable `NDK_ROOT`: 

      Eclipse->Windows->Preferences->C/C++->Build->**Environment**.

      Click **Add** button and add a new variable `NDK_ROOT` pointing to the root NDK directory.

    3. Import libcocos2dx library project:

      File->New->Project->Android Project From Existing Code.

      Click **Browse** button and open `cocos2d-x/cocos2dx/platform/android/java` directory.

      Click **Finish** to add project.

    4. File->New->Project->Android Project From Existing Code

      **Browse** to your project directory. eg: `cocos2d-x/cocos2dx/samples/Cpp/TestCpp/proj.android/`

      Add the project 

      Click **Run** or **Debug** to compile C++ followed by Java and to run on connected device or emulator.

    最后, 在Cygwin控制台下的Cocos2D根目录下执行下面语句

    Chmod -R 755 *

  • 相关阅读:
    Java基础
    Java 基础
    Java基础
    Java基础
    web 学习随记(1)
    jdk8-》List去重
    JVM-调优方案
    JUC_02 AQS工作原理
    Synchronized-可重入锁原理
    JUC_01 线程阻塞、唤醒三种方式
  • 原文地址:https://www.cnblogs.com/micolour/p/3603129.html
Copyright © 2011-2022 走看看