出现了编译错误

发布平台是windows,构建成功,但发布失败

在面板上显示:


Failed to open panel console.panel, panel info not found.
at Object.Panel.open (C:\CocosCreator\resources\app.asar\editor-framework\lib\main\panel.js:1:820)
at EventEmitter. (C:\CocosCreator\resources\app.asar\editor-framework\lib\main\panel.js:1:3192)
at emitThree (events.js:97:13)
at EventEmitter.emit (events.js:175:7)
at EventEmitter. (C:\CocosCreator\resources\atom.asar\browser\api\web-contents.js:134:25)
at emitTwo (events.js:87:13)
at EventEmitter.emit (events.js:172:7)


在native.log文件中显示:

编译模式:release
正在编译…
要求的 VS 版本:[2013, 2015]
正在执行:’“C:\Users\克鸿\Documents\工作区\Andriod\Microsoft Visual Studio\Common7\IDE\devenv.com” “C:\ccproject\web-desktop\NewProject1\build\jsb-binary\frameworks\runtime-src\proj.win32\hello_world.sln” /Build “Release” /Project “hello_world”’

Traceback (most recent call last):
File “C:\CocosCreator\resources\cocos2d-x\tools\cocos2d-console\bin/cocos.py”, line 962, in
run_plugin(command, argv, plugins)
File “C:\CocosCreator\resources\cocos2d-x\tools\cocos2d-console\bin/cocos.py”, line 872, in run_plugin
plugin.run(argv, dependencies_objects)
File “C:\CocosCreator\resources\cocos2d-x\tools\cocos2d-console\plugins\plugin_compile\project_compile.py”, line 1557, in run
self.build_win32()
File “C:\CocosCreator\resources\cocos2d-x\tools\cocos2d-console\plugins\plugin_compile\project_compile.py”, line 1117, in build_win32
self.build_vs_project(projectPath, self.project_name, build_mode, self.vs_version)
File “C:\CocosCreator\resources\cocos2d-x\tools\cocos2d-console\plugins\plugin_compile\project_compile.py”, line 1056, in build_vs_project
self._run_cmd(commands)
File “C:\CocosCreator\resources\cocos2d-x\tools\cocos2d-console\bin\cocos.py”, line 374, in _run_cmd
CMDRunner.run_cmd(command, self._verbose, cwd)
File “C:\CocosCreator\resources\cocos2d-x\tools\cocos2d-console\bin\cocos.py”, line 183, in run_cmd
ret = subprocess.call(command, shell=True, cwd=cwd)
File “C:\Python27\lib\subprocess.py”, line 523, in call
return Popen(*popenargs, **kwargs).wait()
File “C:\Python27\lib\subprocess.py”, line 711, in init
errread, errwrite)
File “C:\Python27\lib\subprocess.py”, line 929, in _execute_child
args = ‘{} /c “{}”’.format (comspec, args)
UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 10-11: ordinal not in range(128)


从报错来看,可能与你的 VS 安装路径有中文有关系。