gpt4 book ai didi

python - cocos creator 无法为 android 平台构建

转载 作者:行者123 更新时间:2023-11-30 04:53:45 26 4
gpt4 key购买 nike

我得到的信息如下。

  Traceback (most recent call last):    File "C:\CocosCreator\resources\cocos2d-x\tools\cocos2d-console\bin\cocos.py", line 983, in       run_plugin(command, argv, plugins)  File "C:\CocosCreator\resources\cocos2d-x\tools\cocos2d-console\bin\cocos.py", line 875, in run_plugin    plugin.run(argv, dependencies_objects)  File "C:\CocosCreator\resources\cocos2d-x\tools\cocos2d-console\plugins\plugin_new\project_new.py", line 258, in run    self.parse_args(argv)  File "C:\CocosCreator\resources\cocos2d-x\tools\cocos2d-console\plugins\plugin_new\project_new.py", line 104, in parse_args    description=self.__class__.brief_description())  File "C:\CocosCreator\resources\cocos2d-x\tools\cocos2d-console\plugins\plugin_new\project_new.py", line 43, in brief_description    return MultiLanguage.get_string('NEW_BRIEF')  File "C:\CocosCreator\resources\cocos2d-x\tools\cocos2d-console\bin\MultiLanguage.py", line 52, in get_string    fmt = cls.get_instance().get_current_string(key)  File "C:\CocosCreator\resources\cocos2d-x\tools\cocos2d-console\bin\MultiLanguage.py", line 158, in get_current_string    ret = ret.encode(self.encoding)  File "C:\CocosCreator\resources\utils\Python27\lib\encodings\cp1252.py", line 12, in encode    return codecs.charmap_encode(input,errors,encoding_table)UnicodeEncodeError: 'charmap' codec can't encode characters in position 0-8: character maps to <undefined>

有人知道为什么会这样吗?

最佳答案

我不懂python,但是修改了MultiLanguage.py的158行(在get_current_string方法中),问题似乎解决了:

ret = ret.encode(self.encoding)

到以下行:

        ret = ret.encode("utf8") #self.encoding

希望对遇到同样问题的人有所帮助。

关于python - cocos creator 无法为 android 平台构建,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59575574/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com