配置NDK Cygwin .bash_profile:行47: 语法错误: 未预期的文件结尾 syntax error: unexpected end of file 解决

可以在cygwin中通过vim修改,也可以在windows安装目录中修改 home\<你的用户名>\.bash_profile 文件中最后添加环境变量

NDKROOT=/cygdrive/e/Andriod/develop/android-ndk-r8

export NDKROOT

其中NDK=/cygdrive/<你的盘符>/<android ndk 目录> ,"NDK"这个名字随便起,以后经常用不要太长。

重启cygwin,输入:

cd $NDK

可进入ndk对应目录说明设置OK。

这时候 出现错误

-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

在cygwin中输入:dos2unix -n .bash_profile .bash_profile

关闭重新打开cygwin,ok了。所以再一次提醒,不要用window里的记事本或者写字本打开修改,使用UltraEdit不要转化格式,因为在window下和linux中回车符是不相同的。

时间: 2024-10-17 12:08:32

配置NDK Cygwin .bash_profile:行47: 语法错误: 未预期的文件结尾 syntax error: unexpected end of file 解决的相关文章

SHELL syntax error:unexpected end of file 提示错误

SHELL syntax error:unexpected end of file 提示错误 if [ -n "$1" ] then echo "111" else echo "222" fi exit 0 执行sh my.sh par 提示syntax error:unexpected end of file.错误请问为什么啊? 文本编辑是在windows下通过记事本编写的这个文件,运行 在cygwin模拟LINUX软件环境下. 解决思路: D

PHP错误Parse error: syntax error, unexpected end of file in test.php on line 12解决方法

今天在写PHP程序的时候总是出现这样的错误:Parse error: syntax error, unexpected end of file in *.php on line *,然后我就根据提示,找到那个文件,然后错误中总是提示最后一行出错,我找到最后一行发现是</html>,晕的,这能有什么错误,找了好久才找到问题所在,拿来分享. 出现这个错误的原因就是语法错误,肯定是PHP程序的书写不规范造成,我后来一条一条看才发现,原来是PHP语句标识符错了,正常情况下应该是这样的:<?php

linux 下出现 SHELL syntax error:unexpected end of file 提示错误

基本上可以判断是字符异常错误 首先注释掉尽快会出错的代码,然后进行判断 如果代码没有问题,可以修改字符格式 vim文本下,esc推出编辑模式  :set fileformat unix ,最后:wq 保存 ,错误消失. 参考http://blog.csdn.net/david_xtd/article/details/7577265

使用 trait 时报PHP Parse error: syntax error, unexpected &#39;use&#39; (T_USE) 这个错误

找一大圈原因, 最后终于找到了, 不是PHP版本的原因[], 是自己把use 写到了类里的方法里了. 这个东东,  不能脱离类单独使用, 否则的话, 会被认为是命名空间了. 测试例子如下 // Trait.php trait CustomerFunctionsTrait { public function plus ( $a = 1, $b = 1 ) { echo $a + $b; } public function minus ( $a = 5, $b = 1 ) { echo $a - $

执行shell脚本遇到错误syntax error: unexpected &quot;then&quot; (expecting &quot;}&quot;)

今天执行脚本的时候遇到错误,如下图: root@ApFree:/usr/sbin# ./conntrack_num_graph.sh ./conntrack_num_graph.sh: line 9: syntax error: unexpected "then" (expecting "}") root@ApFree:/usr/sbin# 我就纳闷了,这个脚本几天前是能正常执行的,今天执行怎么会出错,why? cat脚本一看如下: #!/bin/sh SITENA

10.29 工作笔记 ndk编译C++,提示找不到头文件(ndk-build error: string: No such file or directory)

ndk编译C++.提示找不到头文件(ndk-build error: string: No such file or directory) 被这个问题弄得愁眉苦脸啊.心想为啥一个string都找不到呢..于是百度到了. . . 遇到这个问题,就在所在的文件夹 Application.mk 文件里.加入: APP_STL := gnustl_static 就能够找到标准库了! 最后知道真相的我.眼泪掉下来啊!

PHP Parse Error: syntax error, unexpected $end 错误的解决办

可以在php.ini中设置short_open_tag = On 第一步,登录到sql命令行 第二步,使用sql语句修改root密码 使用sql语句改密码时一定要选中数据库 .使用 use mysql;否则会出错 2016.6.5    孤独夜莺

php报错syntax error, unexpected T_GOTO, expecting T_STRING,报错文件与行数指向以下代码,是什么原因?

本机php版本是5.3.8,Apache/2.2.21public function goto($url, $msg=NULL) {if ($msg) {$this->jsAlert($msg);}$this->js('document.location="' . $url . '";');$this->output(true);exit;} 解决办法是将phpstudy版本号php-5.3.29改为php-5.2.17

Python脚本运行出现语法错误:IndentationError: unindent does not match any outer indentation level(转)

[问题] 一个python脚本,本来都运行好好的,然后写了几行代码,而且也都确保每行都对齐了,但是运行的时候,却出现语法错误: IndentationError: unindent does not match any outer indentation level [解决过程] 1.对于此错误,最常见的原因是,的确没有对齐.但是我根据错误提示的行数,去代码中看了下,没啥问题啊. 都是用TAB键,对齐好了的,没有不对齐的行数啊. 2.以为是前面的注释的内容影响后面的语句的语法了,所以把前面的注释