TonyAnny专栏

滴水藏海

Mac命令打包安卓包报错unknown locale: UTF-8的解决方法

前几天升级了XCODE 9.3,今天输入命令“cocos compile -p android -m release”打包安卓包发现不行了,报了个错误,

错误信息大概如下:

Traceback (most recent call last):  

File "gitinspector.py", line 25, in <module>    localization.init()  

File "/Users/fdhuang/learing/git-analytics/gitinspector-0.3.2/gitinspector/localization.py", line 43, in init    lang = locale.getlocale()  

File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 562, in getlocale    return _parse_localename(localename)  

File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 475, in _parse_localename    

raise ValueError, 'unknown locale: %s' % localenameValueError: unknown locale: UTF-8

奇怪了,一下了没反应过来,后面百度了一下“ValueError: unknown locale: UTF-8”,就出现了下面的这个连接,

http://ju.outofmemory.cn/entry/107663

我按照 他的方法去打开 .bash_profile,可以用命令

open ~/.bash_profile -a TextEdit” 打开,在这个文件的最上方粘贴如下代码,在这个文件的最上方粘贴如下代码

export LANG="en_US.UTF-8"
export LC_COLLATE="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
export LC_MESSAGES="en_US.UTF-8"
export LC_MONETARY="en_US.UTF-8"
export LC_NUMERIC="en_US.UTF-8"
export LC_TIME="en_US.UTF-8"
export LC_ALL=

然后执行命令source ~/.bash_profile保存修改,再次cocos complie xxxxx 果然好了,感谢上面连接的哥们!





阅读更多
个人分类: cocos2dx
上一篇unity3d android 包入口默认类UnityPlayerActivity与UnityPlayerNativeActivity
下一篇mac 下 logcat方法使用笔记
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭