我跟随this guide关注cocos2d并且很难弄清楚我为什么会收到错误。我正在使用setup.py配置您的Android开发环境"指南中的部分。每次我运行setup.py时都会得到这个:
Setting up cocos2d-x...
->Check environment variable COCOS_CONSOLE_ROOT
->Search for environment variable COCOS_CONSOLE_ROOT...
->COCOS_CONSOLE_ROOT not found
-> Add COCOS_CONSOLE_ROOT environment variable...
Traceback (most recent call last):
File "setup.py", line 730, in <module>
opts.ndk_root, opts.android_sdk_root, opts.ant_root)
File "setup.py", line 687, in set_environment_variables
self.set_console_root()
File "setup.py", line 473, in set_console_root
COCOS_CONSOLE_ROOT, cocos_consle_root)
File "setup.py", line 206, in _set_environment_variable
ret = self._set_environment_variable_unix(key, value)
File "setup.py", line 186, in _set_environment_variable_unix
shutil.copy(self.file_used_for_setup, self.backup_file)
File "/usr/lib/python2.7/shutil.py", line 119, in copy
copyfile(src, dst)
File "/usr/lib/python2.7/shutil.py", line 82, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: ''
我将不胜感激任何帮助!
答案 0 :(得分:0)
嗨,请检查您是否设置了所提到的指南中的所有环境变量。未找到消息COCOS_CONSOLE_ROOT表示环境变量不可见或未设置为当前终端会话。设置环境变量并重新启动终端并再次尝试运行命令。