Syntax error: redirection unexpected

在安裝Android NKD後執行make-standalone-toolchain.sh時出現錯誤“make-standalone-toolchain.sh: 701: ./make-standalone-toolchain.sh: Syntax error: redirection unexpected”,同時執行時出現警告“WARNING: The shell running this script isn't bash. Although we try to avoid bashism in scripts, things can happen.”

打開腳本701行

for ABI in $(tr ',' ' ' <<< $ABIS); do

 

經查,應爲"<<<"的問題。在執行時解釋器指定爲bash,則無錯誤。

 

指定解釋器(#!/bin/bash)應該要放在第一行

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章