Configure the cocos2dx2.2.6 Android environment under Mac

Source: Internet
Author: User

Recently learning how to pack the APK on your Mac, cocos2dx the process of installing the JDK and ant today.

First, open the terminal and enter "Java-version"

When you click Enter, the following prompt appears:

The JDK is not installed on our Mac, clicking "More Info" will open the browser, then download the corresponding version of the JDK, here to select "Accept License agreement" before you can download

After the download, install, here directly next to the

After the installation, we re-enter the command to view the results, has been successfully installed

Next is ant, below we still enter the command "Ant-version" in the terminal, also is not installed

We can download the latest version from official website http://ant.apache.org/bindownload.cgi, download the first item here.

After downloading the extract, you need to put the folder in the "/usr/local" directory, the way to enter the directory is as follows:

First open the Finder, then click "Go"--"Go to Folder"

Then enter the path, where the path is only "/usr", the local folder is to create our own

Below we put the previously downloaded Ant folder in the "local" directory

Next open the terminal, get root permissions, we enter the "sudo-s" command, and then enter the administrator password to

When you click Enter, the terminal's prompt will become "bash-3.2#"

We then enter the command "chmod +W/ETC/BASHRC" to modify the permissions of the BASHRC file, and then enter the command "VI/ETC/BASHRC" to modify the file

Press "I" key to enter insert state, insert the following two lines in the file

The path here is the directory where we just placed Ant.

At this point we press "ESC" key to exit the edit state, and then enter ": wq!" (the command in quotation marks), click Enter, save and exit.

Finally, we shut down the terminal. Then, re-open the terminal and enter "Ant-version" again to see the following output, indicating that our ant configuration was successful

Configure the cocos2dx2.2.6 Android environment under Mac

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.