[英]cocos creator can not build for android platform
The information I got as follows.我得到的信息如下。
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>
any one knows why this happened?有谁知道为什么会这样?
I do not know python, but the problem seems solved afterI made the modification to the line 158 of MultiLanguage.py(in the get_current_string method):我不知道python,但在我对MultiLanguage.py的第158行(在get_current_string方法中)进行修改后问题似乎解决了:
ret = ret.encode(self.encoding)
to the following line:到以下行:
ret = ret.encode("utf8") #self.encoding
Hope this helps people who encounter the same problem.希望这可以帮助遇到同样问题的人。
Take a look at the versions of NDK and SDK, NDK.看看NDK和SDK的版本,NDK。 The recommended version is R17 - R19
推荐版本为 R17 - R19
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.