配置NDK syntax error: unexpected end of file 解决
2013-04-09 20:00
573 查看
android NDK开发中,在window环境下需要安装cygwin来模拟linux环境,在网上配置文章较多,不详述,在配置的过程中,需要修改cybwin\home\XXX(you computer name)目录下的.bash_profile中末尾添加ANDROID_NDK_ROOT=/cygdrive/d/andorid/NDK/android-ndk-r7b
export ANDROID_NDK_ROOTANDROID_NDK_ROOT(可以随意命名)。在使用UltraEdit打开.bash_profile文件的时候,点了转化为DOS format。
在启动cygwin,会显示
-bash: $'\r': command not found
-bash: $'\r': command not found
-bash: $'\r': command not found
-bash: $'\r': command not found
-bash: $'\r': command not found
-bash: $'\r': command not found
-bash: $'\r': command not found
-bash: /home/lenovo/.bash_profile: line 47: syntax error: unexpected end of file
错误。一开始没有找到好的方法,后来在:http://glitterhsin.pixnet.net/blog/post/88049087-%E5%8D%A1%E9%97%9C%EF%BC%8C%E5%8D%83%E8%90%AC%E4%B8%8D%E8%A6%81%E7%94%A8wordpad%E7%B7%A8%E8%BC%AF.bash_profile 中找到解决办法,非常简单(这个网页好像要翻墙才能看到)。 在cygwin中输入:dos2unix -n .bash_profile .bash_profile
关闭重新打开cygwin,ok了。所以再一次提醒,不要用window里的记事本或者写字本打开修改,使用UltraEdit不要转化格式,因为在window下和linux中回车符是不相同的。
export ANDROID_NDK_ROOTANDROID_NDK_ROOT(可以随意命名)。在使用UltraEdit打开.bash_profile文件的时候,点了转化为DOS format。
在启动cygwin,会显示
-bash: $'\r': command not found
-bash: $'\r': command not found
-bash: $'\r': command not found
-bash: $'\r': command not found
-bash: $'\r': command not found
-bash: $'\r': command not found
-bash: $'\r': command not found
-bash: /home/lenovo/.bash_profile: line 47: syntax error: unexpected end of file
错误。一开始没有找到好的方法,后来在:http://glitterhsin.pixnet.net/blog/post/88049087-%E5%8D%A1%E9%97%9C%EF%BC%8C%E5%8D%83%E8%90%AC%E4%B8%8D%E8%A6%81%E7%94%A8wordpad%E7%B7%A8%E8%BC%AF.bash_profile 中找到解决办法,非常简单(这个网页好像要翻墙才能看到)。 在cygwin中输入:dos2unix -n .bash_profile .bash_profile
关闭重新打开cygwin,ok了。所以再一次提醒,不要用window里的记事本或者写字本打开修改,使用UltraEdit不要转化格式,因为在window下和linux中回车符是不相同的。
相关文章推荐
- 配置NDK Cygwin .bash_profile:行47: 语法错误: 未预期的文件结尾 syntax error: unexpected end of file 解决
- Parse error: syntax error, unexpected end of file in * 的解决办法
- linux经常使用(一)linux 安装配置 jdk之 找不到安装文件文件夹及source /etc/profile 报unexpected end of file 错误 解决
- PHP错误Parse error: syntax error, unexpected end of file in test.php on line 12解决方法
- Parse error: syntax error, unexpected end of file in *.php on line * 解决方法
- syntax error : unexpected end of file 问题的解决
- 【问题解决】syntax error: unexpected end of file或-bash: ./full_build.sh: /bin/bash^M: bad interpreter: No
- 关于Qt for Android 编译时出错/usr/bin/sh: -c: line 1: syntax error: unexpected end of file 时的解决方法
- 解决shell错误:syntax error: unexpected end of file
- 【问题解决】syntax error: unexpected end of file或-bash: ./full_build.sh: /bin/bash^M: bad interpreter: No
- syntax error: unexpected end of file解决方法
- 解决shell错误:syntax error: unexpected end of file
- 解决执行脚本报syntax error: unexpected end of file或syntax error near unexpected token `fi'错误的问题
- bin/sh -c:line 1 Syntax Error:unexpected end of file的解决方法
- 在执行shell脚本时,出现“syntax error : unexpected end of file"错误的解决方法
- bash: /home/x/.bash_profile: line 48: syntax error: unexpected end of file的解决
- linux常用(一)linux 安装配置 jdk之 找不到安装文件目录及source /etc/profile 报unexpected end of file 错误 解决
- PHP错误Parse error: syntax error, unexpected end of file in test.php on line 12解决方法
- 解决执行脚本报syntax error: unexpected end of file或syntax error near unexpected token `fi'错误的问题
- bin/sh -c:line 1 Syntax Error:unexpected end of file的解决方法