Home Database Mysql Tutorial eclipse创建2dx项目

eclipse创建2dx项目

Jun 07, 2016 pm 03:00 PM
eclipse create Check environment path project

1.查看环境(核查路径和对应的2dx版本) 终端: open .bash_profile export PATH=${PATH}:/Users/admin/Documents/work/android/android-sdk-macosx/tools export COCOS2DX_ROOT=/Users/admin/Documents/work/android/cocos2d-2.1rc0-x-2.1.2 export ANDROID_S

1.查看环境(核查路径和对应的2dx版本)

终端:open  .bash_profile

export PATH=${PATH}:/Users/admin/Documents/work/android/android-sdk-macosx/tools

export COCOS2DX_ROOT=/Users/admin/Documents/work/android/cocos2d-2.1rc0-x-2.1.2

export ANDROID_SDK_ROOT=/Users/admin/Documents/work/android/android-sdk-macosx

export ANDROID_NDK_ROOT=/Users/admin/Documents/work/android/android-ndk-r8d

export NDK_ROOT=/Users/admin/Documents/work/android/android-ndk-r8d

export PATH=$PATH:$ANDROID_NDK_ROOT

export PATH=$PATH:$ANDROID_SDK_ROOT


2.创建android 2dx项目

(1)cd   2dx目录

(2)./create-android-project.sh   创建项目

(3)输入包名

(4)选android版本

(5)输入项目名


3.android的2dx项目引进eclipse并转换成C++

(1)把新创建的项目proj.android引进eclipse

ERROR:项目名.java文件出错

删除原有的:org.cocos2dx包,建立org.cocos2dx.lib包

这个目录下的.java文件拷贝到新建的包(org.cocos2dx.lib包)下

/Users/admin/Documents/work/android/cocos2d-2.1beta3-x-2.1.0/cocos2dx/platform/android/java/src/org/cocos2dx/lib

(2)转换成c++(选择Makefile projectMacOSX GCC)

ERROR:

eclipse创建2dx项目

DescriptionResourcePathLocationType   错误提示

Program "g++" not found in PATHPreferences, C++/Build/Settings/Discovery, [CDT GCC Built-in Compiler Settings] optionsC/C++ Scanner Discovery Problem

可能是不识别gcc, g++命令通过xcode安装这两个终端命令

eclipse创建2dx项目

(3)右键项目选择Properties


4.配置eclipse环境

右键项目选择Properties

(1)C/C++ Build:Build command: 

     …(路径)/build_native.sh(项目的那个文件)

(2)Environment: 右边的add:  

     name: NDK_ROOT   

     value:/Users/admin/Documents/work/android/android-ndk-r8d

(3)C/C++ General: Paths and Symbols:  includes: GUN C++ :add

     /Users/admin/Documents/work/android/android-ndk-r8d/platforms/android-8/arch-arm/usr/include

     /Users/admin/Documents/work/android/cocos2d-2.1beta3-x-2.1.0/CocosDenshion/include

    /Users/admin/Documents/work/android/cocos2d-2.1beta3-x-2.1.0/extensions    //extensions用到这里边的类了

(4)C/C++ General: Paths and Symbols: Output Location:

     项目的Classes目录

    /Users/admin/Documents/work/android/cocos2d-2.1rc0-x-2.1.2/cocos2dx  目录

    /Users/admin/Documents/work/android/cocos2d-2.1beta3-x-2.1.0/extensions    //extensions用到这里边的类了


5.android 2dx项目移到 .../cocos2d-2.1rc0-x-2.1.2文件夹外

(1)修改build_native.sh

COCOS2DX_ROOT="/Users/admin/Documents/work/android/cocos2d-2.1beta3-x-2.1.0"
APP_ROOT="/Users/admin/Desktop/today/AAA"
APP_ANDROID_ROOT="/Users/admin/Desktop/today/AAA/proj.android"

NDK_ROOT="/Users/admin/Documents/work/android/android-ndk-r8d"    //有的不需要修改

(2)改变4 (1)的文件路径 /Users/admin/Desktop/today/AAA/proj.android/build_native.sh

ERROR: 如果你已经编译过2dx项目了/Users/admin/Documents/work/android/cocos2d-2.1beta3-x-2.1.0/WU/proj.android/obj

                把obj目录删除,obj目录是编译c++后生成的。


6.不在终端编译 .../build_native.sh

bash ${workspace_loc:/ATest}/build_native.sh NDK_DEBUG=1 V=1

在# options后加 NDK_ROOT=/Users/admin/Documents/android/android-ndk-r8d


7.从其他地方引进2dx android项目

(1)按照 4 从新搭建环境

(2)按照 5 修改 build_native.sh文件

(3)修改文件(build_native.sh)权限

Error: Permission denied

    chmod -R 777  文件路径

ERROR: 如果你已经编译过2dx项目了/Users/admin/Documents/work/android/cocos2d-2.1beta3-x-2.1.0/WU/proj.android/obj

                把obj目录删除,obj目录是编译c++后生成的。



















Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1666
14
PHP Tutorial
1272
29
C# Tutorial
1252
24
Check out the steps to delete a logged-in device on Douyin Check out the steps to delete a logged-in device on Douyin Mar 26, 2024 am 09:01 AM

1. First, click to open the Douyin app and click [Me]. 2. Click the three-dot icon in the upper right corner. 3. Click to enter [Settings]. 4. Click to open [Account and Security]. 5. Select and click [Log in to device management]. 6. Finally, click to select the device and click [Remove].

Can AI conquer Fermat's last theorem? Mathematician gave up 5 years of his career to turn 100 pages of proof into code Can AI conquer Fermat's last theorem? Mathematician gave up 5 years of his career to turn 100 pages of proof into code Apr 09, 2024 pm 03:20 PM

Fermat's last theorem, about to be conquered by AI? And the most meaningful part of the whole thing is that Fermat’s Last Theorem, which AI is about to solve, is precisely to prove that AI is useless. Once upon a time, mathematics belonged to the realm of pure human intelligence; now, this territory is being deciphered and trampled by advanced algorithms. Image Fermat's Last Theorem is a "notorious" puzzle that has puzzled mathematicians for centuries. It was proven in 1993, and now mathematicians have a big plan: to recreate the proof using computers. They hope that any logical errors in this version of the proof can be checked by a computer. Project address: https://github.com/riccardobrasca/flt

Where to check music rankings on NetEase Cloud Music_How to check music rankings on NetEase Cloud Music Where to check music rankings on NetEase Cloud Music_How to check music rankings on NetEase Cloud Music Mar 25, 2024 am 11:40 AM

1. After turning on the phone, select NetEase Cloud Music. 2. After entering the homepage, you can see the [Ranking List] and click to enter. 3. In the ranking list, you can select any list and click [New Song List]. 4. Select your favorite song and click on it. 5. Return to the previous page to see more lists.

How to create a folder on Realme Phone? How to create a folder on Realme Phone? Mar 23, 2024 pm 02:30 PM

Title: Realme Phone Beginner’s Guide: How to Create Folders on Realme Phone? In today's society, mobile phones have become an indispensable tool in people's lives. As a popular smartphone brand, Realme Phone is loved by users for its simple and practical operating system. In the process of using Realme phones, many people may encounter situations where they need to organize files and applications on their phones, and creating folders is an effective way. This article will introduce how to create folders on Realme phones to help users better manage their phone content. No.

How to view the hot list of Kuaishou Live Companion videos How to view the hot list of Kuaishou Live Companion videos Mar 29, 2024 pm 08:09 PM

Kuaishou Live Companion is not only a powerful live broadcast auxiliary tool, but also a real-time insight platform for hot topics and trends created for broadcasters. Through this function, anchors can quickly capture the content that audiences are most concerned about, and then adjust the live content to make it more in line with the audience's tastes and interests. So how to check the hot video list in the Kuaishou Live Companion app? This tutorial guide will provide you with a detailed introduction to the steps. I hope it can help you. How to view the hot video list on Kuaishou Live Companion? The second step is to click on the daily video hot list. The third step is to check the daily video hot list.

How to check your own ID on Xianyu_Introduction to how to check your personal nickname on Xianyu How to check your own ID on Xianyu_Introduction to how to check your personal nickname on Xianyu Mar 22, 2024 am 08:21 AM

As a trading platform, Xianyu requires you to register and log in to your account before using it. Users can set an ID name for their account. What if they want to check what their ID is? Let’s find out together below! Introduction to how to view personal nicknames on Xianyu. First, start the Xianyu app. After entering the homepage, switch to the page of selling idle, messages, and me, and click the [My] option in the lower right corner. 2. Then on my page we need to click [Avatar] in the upper left corner; 2. Then when we go to the personal homepage page we can see different information, we need to click the [Edit Information] button here; 4. Finally click We can see it later on the page where we edit information;

How to check how many groups you have joined on WeChat: a simple step How to check how many groups you have joined on WeChat: a simple step Mar 26, 2024 am 10:06 AM

Regardless of life or work, many people have long been deeply tied to WeChat and will be pulled into various groups at any time. So how many WeChat groups have you joined? You may immediately want to view the group chats in your address book, but only the WeChat groups you have saved in your address book will appear there, and other groups will not be visible. If you want to see all the WeChat groups you have joined, it is very simple: enter your nickname in the search box on the WeChat homepage, then find the group chat section in the search results, and click "More Group Chats" to view all related group chat information. Anyway, I was shocked. There were more than a hundred of them, and the scroll bar on the right became very small. Unfortunately, there is no specific number statistics... This method is also applicable to checking the QQ groups you have joined. PS: Some netizens also provided a trick:

What is the difference in the 'My Computer' path in Win11? Quick way to find it! What is the difference in the 'My Computer' path in Win11? Quick way to find it! Mar 29, 2024 pm 12:33 PM

What is the difference in the "My Computer" path in Win11? Quick way to find it! As the Windows system is constantly updated, the latest Windows 11 system also brings some new changes and functions. One of the common problems is that users cannot find the path to "My Computer" in Win11 system. This was usually a simple operation in previous Windows systems. This article will introduce how the paths of "My Computer" are different in Win11 system, and how to quickly find them. In Windows1

See all articles