2013-10-16 13 views

回答

-1

您可以運行腳本作爲一個正常的過程,並獲取返回B Y形腳本的輸入流。

try{ 
     Process proccess = new ProcessBuilder() 
      .command("path to yur script file") 
      .redirectErrorStream(true) 
      .start(); 

     InputStream in = new BufferedInputStream(proccess.getInputStream()); 
     in.close(); 
    }catch(IOException ioe){ 
     ioe.printStackTrace(); 
    } 
+0

你我錯過了這裏的要點,我希望它是編譯的一部分,如果腳本失敗,android.mk編譯應該聲明失敗並停止。 – amirelouti

0

我想你想達到什麼樣的,這應該工作:

ifeq (1,$(shell $(LOCAL_PATH)/makescript.sh)) 
$(error your error message.) 
endif 

如果你想這樣做的分配價值的方式,

return_val := $(shell $(LOCAL_PATH)/makescript.sh) 
ifeq (1, $(return_val)) 
$(error your error message.) 
endif 
相關問題