I have installed Cocos2d-x for android in windows. And I have run the setup.py file successfully.
When I tried to check if I did it all ok, I restarted my PC as I was asked to and open the cmd,
I tried the command, cocos just to check if its ok and I got this error:
C:\Users\Gilad>cocos
Traceback (most recent call last):
File "C:\Users\Gilad\AppData\Local\Programs\cocos2d-x-3.12\tools\cocos2d-console\bin\/cocos.py", line 22, in <module>
import cocos_project
File "C:\Users\Gilad\AppData\Local\Programs\cocos2d-x-3.12\tools\cocos2d-console\bin\cocos_project.py", line 4, in <module>
import cocos
File "C:\Users\Gilad\AppData\Local\Programs\cocos2d-x-3.12\tools\cocos2d-console\bin\cocos.py", line 935, in <module>
locale.setlocale(locale.LC_ALL, '') # use user's preferred locale
File "C:\Users\Gilad\AppData\Local\Programs\Python\Python27\lib\locale.py", line 581, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting
I know that this solution should solve it: Cocos2d-x v3.9 released!
But it doesn’t work for windows.
Anyone know how can I fix it in windows?
Yes it is the first time I’m installing cocos2d-x.
I can upgrade, but I read that if I want to develop my game in visual studio I have to use v3.12. So should I upgrade?
When I’m running the setup.py for the v3.17 I’m getting this error: ->Error: "C:\Users\Gilad\AppData\Local\Programs\android\sdk" is not a valid path of ANDROID_SDK_ROOT. Ignoring it.
Although when I’m running ‘cocos’ in the cmd it works fine. Isn’t it strange?
Perhaps it will help define for windows. @mars3142 probably uses windows and he knows his Android backwards and forwards. Perhaps he can clarify paths.
I’m sorry. My working device is a MacBook Pro. I do have Windows in Parallels installed, but not for Android. And because the error is from setup.py, if I understand the report from @giladk correct, it wouldn’t be an Android issue per se.
I checked the setup.py and there seems to be two checks. The first one checks for ndk-build.cmd and the second one is looking for android.bat. Your error is because of the missing android.bat file. Please check you do have a android.bat in the ANDROID_SDK_ROOT/tools folder.
But because of the error, I’ll bet the file is missing. So my advice: Reinstall the Android SDK
guys I can’t exactly setup my cocos2d-x in setup.py. it says that the file I have isn’t the android sdk even after I downloaded android sdk and the studio. what file exactly is the android sdk?
i just want to know that I am installing the right sdk from the android developer website. I down loaded it from the part where it says"sdk command line tools ". thanks