*** non-numeric second argument to `wordlist' function: ''. Stop错误解决办法

PS: 解决办法搜集自:stackoverflow
website:http://stackoverflow.com/questions/5677178/ndk-gdb-fails-with-message-invalid-attribute-name-package

1. 原因:
The AndroidManifest.xml file had Windows carriage control (\r\n) which was messing up the ndk-gdb script. 

总之就是说AndroidManifest.xml文件格式不对,原格式是Windows下面的dos格式,现在转到Mac OS X下面了,文件格式不对,对里面的内容的读取出现问题不能正常解析,现在需要转换成Mac OS X下面的unix格式才可以.
例如:如果使用的开发IDE是Eclipse,则可以用Eclipse打开该文件,然后开启Eclipse里面的显示空白特殊字符功能,就可以发现出现该错误的AndroidManifest.xml文件和没有错误的正常的AndroidManifest.xml文件,每行后面的换行字符不一样。

Eclipse里面开启“显示空白特殊字符”功能方法:
"general"->"Editors"->"Text Editors"选中后,右侧"Show whitespace characters"选面选中即可。


2. 解决办法:
To fix this,

edited the file in vi and did a "set filetype=unix".
on mac, it should be "set fileformat=unix". 


That is:
vim AndroidManifest.xml
:set fileformat=unix
:w
:q!


ps: 相应的Linux下面则用unix2dosdos2unix即可;windows下面,则可以使用UltraEdit工具转换。

posted on 2013-07-04 10:41  封起De日子  阅读(173)  评论(0编辑  收藏  举报

导航