Console says it found ROOT but the ROOT isnt there

So i tried installing and setting up cocos2d-x and totally failed so i removed every file and asked for help on the forums… got a reply and started redoing everything… now when i open console it doesnt ask for help to finiding the root of the ndk and sdk and ant … it just says it found it but the root for the files isnt there anymore…

How do i fix this??

so the CocosDev is where the files are at but it says it found root in the android folder… And the android folder isnt there anymore…

Thanks for any help!

delete the environment variables that are defined when you run setup.py
like -

ANDROID_SDK_ROOT
NDK_ROOT etc

then run setup.py again.

@pabitrapadhy Can you please guide me to deleting the variables? Thank You.

@SonicX278

press [windows] button and type “environment variables”, then press enter.

Delete the following environment variables -

NDK_ROOT
ANDROID_SDK_ROOT
COCOS_CONSOLE_ROOT
COCOS_TEMPLATE_ROOT
ANT_ROOT

Press OK after delete.

Now, run setup.py again.
It will ask for all the paths again.

@pabitrapadhy

So im having another issue… So i redid all the variable and it works… But now when i open a new console and type in

C:\Users\USER>cocos new
'python' is not recognized as an internal or external command,
operable program or batch file.

Gives me that error…

Thanks!

you accidentally deleted your python environment variable

Just check in your system, you must have python somewhere.
Usually it should be named as Python27

open environment variables again.
under “path” variable add that to the end.
it should be something like this -
C:\agd\cocos2d-x-3.6\templates;C:\agd\cocos2d-x-3.6\tools\cocos2d-console\bin;C:\Python27

Press OK.
try again

You are like amazing haha THANKS!!!

Glad it helped. :smile:

@pabitrapadhy

I have one last but not least question…

How do i open the newly created project in android studio?? And edit the game?

Thanks!

@pabitrapadhy

So i tried doing what this guy in this video said to do…(starting at 8:55)

And when i try running “build_native.py”

I get this error

C:\Users\ruvim\Hiber\proj.android>build_native.py
Please use cocos console instead.

Running command: compile
Building mode: debug
Using Eclipse project : C:\Users\ruvim\Hiber\proj.android
ANT_ROOT not defined. Please define it in your environment.
Traceback (most recent call last):
File "C:\Users\ruvim\Hiber\proj.android\build_native.py", line 43, in <module>

    build(opts.build_mode)
  File "C:\Users\ruvim\Hiber\proj.android\build_native.py", line 28, in build
    raise Exception("Build dynamic library for project [ " + app_android_root +
" ] fails!")
Exception: Build dynamic library for project [ C:\Users\ruvim\Hiber\proj.android
\../ ] fails! 

What do i do?

So i fixed the problems i was having… Thanks to anyone that helped!