Error!!! Please run in cocos2dx root.

Hi all,
I am quite new to cocos2dx and I am trying to set the engine up for both iPhone and Android development as a hybrid, however I am trying to setup the android project and keep getting the “Error! Please run in cocos2dx root.” which makes no sense as I am assuming the root folder is the cocos2dx folder in which create-android-project currently resides. I am also fairly new to mac as well however I feel it might be a lot cleaner developing both on mac.
I am using the terminal command bash and then entering the files directory for example,
“bash /Users/myname/Desktop/Android_Development/cocos2d-2.0-x-2.0.4/cocos2dx/create-android-project.sh” however run into the error.
Can someone please point out where I am going wrong?
Thanks in advance.

EDIT*
Hi have solved this issue by renaming the .sh file to a .command file hence making it run on double clicking the file. Had tried fruitlessly for hours with different paths, even though create-android-project.sh was in the root folder however this did the trick.

EDIT*
My apologies this turned out to be false as I made the change on create-project-blackberry.sh instead of the create-project-android.sh….
Currently I still have the error.

You should perhaps run it from cocos root dir. That would be “/Users/myname/Desktop/Android_Development/cocos2d-2.0-x-2.0.4/cocos2dx” in your case.

You should cd first.

cd /Users/myname/Desktop/Android_Development/cocos2d-2.0-x-2.0.4/cocos2dx

Hi, I will try to “cd”. My apologies I am not sure of the terminology as I am mainly a windows user…
However strangely when I ran .command on the create-project-blackberry.sh this works fine however regardless of what I do with create-project-android.sh (even changing the .sh to .command) I still have the error returned which is incredibly frustrating.
I will give your suggestion a try first.
Thanks in advance.

Hi,
I have tried to cd as suggested however I still can not get the creat-android-project.sh to run…
It is still returning the error! Please run in cocos2dx. Im completely clueless as to how to fix this.
Is there any alternatives to setting up a new cocos2dx android project manually?
Thanks in advance.

I have actually managed to get the project to build now thanks to AW and Lance Gray for giving me a hand.