2011-10-19 30 views
0

升級到Android SDK工具V14和更新現有項目,最後項目結構後,ant test失敗,出現錯誤消息:運行「螞蟻測試」使用Android SDK工具V14

輸出的 ant -v test

[echo] Running tests ... 
    [exec] Current OS is Mac OS X 
    [exec] Executing '/opt/local/share/java/android-sdk-mac_x86/platform-tools/adb' with arguments: 
    [exec] 'shell' 
    [exec] 'am' 
    [exec] 'instrument' 
    [exec] '-w' 
    [exec] '-e' 
    [exec] 'coverage' 
    [exec] 'false' 
    [exec] 'xxx.xxx/xxx.xxx' 
    [exec] 
    [exec] The ' characters around the executable and arguments are 
    [exec] not part of the command. 
test: 
    [echo] Running tests ... 
    [exec] Syntax error: Bad substitution` 

但直接執行命令adb shell am instrument沒問題。 我的環境是Mac上的Apache Ant(TM)1.8.2版。 請幫忙。

+0

這是否顯示錯誤 - 下一行是「錯誤的替代」? –

回答

0

這是一個已知的r14工具問題。請參閱http://tools.android.com/knownissues

Testing ant test fails with Syntax error: Bad substitution. A last minute change introduced this error in the Ant rules file. The workaround is to edit /tools/ant/build.xml, line 318 and to change ${manifest.package} with ${tested.manifest.package}. [Issue 20979]