Ubuntu系统编译Android平台,source和lunch命令执行正常,编译时log显示:
/bin/sh: 1: source: not found
/bin/sh: 1: lunch: not found
/bin/sh: 1: get_build_var: not found
/bin/sh: 1: unexpected operator
等异常
解决方法:
shell脚本命令开启POSIX模式,将bin/sh由dash切换为bash
$ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Sep 7 10:02 /bin/sh -> dash
执行sudo dpkg-reconfigure dash 将dash切换为bash
切换后问题解决。