编译jni
从windows环境下降工程文件拷贝到Ubuntu
ndk-build 的时候报错了、
Invalid attribute name:
package
/home/ss/android-ndk-r8c/build/gmsl/__gmsl:512: *** non-numeric second argument to `wordlist' function: ''. Stop.
网上搜索导致的原因是,AndroidManifest.xml 格式导致的,要安装dos2unix 可是我的ubuntu是10.04,已经不支持该命令了,原因是被tofrodos取代了,所以
sudo apt-get install tofrodos
dpkg -L tofrodos
可以看到如下信息
/.
/usr
/usr/bin
/usr/bin/fromdos
/usr/share
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/fromdos.1.gz
/usr/share/doc
/usr/share/doc/tofrodos
/usr/share/doc/tofrodos/NEWS.Debian.gz
/usr/share/doc/tofrodos/tofrodos.html
/usr/share/doc/tofrodos/copyright
/usr/share/doc/tofrodos/changelog.Debian.gz
/usr/share/doc/tofrodos/readme.txt.gz
/usr/bin/todos
/usr/share/man/man1/todos.1.gz
进入包含AndroidManifest.xml的文件夹
fromdos -d AndroidManifest.xml ------>命令参数可以-help查看
再次ndk-build 看看是不是将问题解决了!