5
votes

I'm using Cocos2dx 3.0 RC1, and in the installation i typed : ./setup.py

I entered my NDK root, and my SDK root, but didn't put anything on my ANT root as explained in this tutorial : here . But know when i use : cocos run -s ~/MyCompany/MyGame -p android, it says that my ANT_ROOT is not defined. I've installed it using Macport, but when i type ant, it says Build is missing.

I just want to create a game in Android using Cocos2dx.

3

3 Answers

3
votes

You could go ahead and define ANT_ROOT in your .bash_profile.

export ANT_ROOT=<where ever it is>
export PATH=$ANT_ROOT:$PATH
1
votes

I had the same problem as OP. My .bash_profile already contained the exports; however it seems that it wasn't loaded. So just

source ~/.bash_profile

did the trick!

0
votes

For macOS:

Install Homebrew. Run brew install ant. Add the export (with correct location) to your .bash_profile file:

export ANT_ROOT=/usr/local/bin