2017-02-13 89 views
0

我已經在我的android項目中包裝了一個靜態編譯的python,然後執行了python腳本(webserver),程序運行良好,但是我無法讀取輸出/錯誤流,這樣我就執行了python3.4 -h,這個程序讀得很好。Android,Java無法讀取進程輸出/錯誤流

Process process = Runtime.getRuntime().exec(commandLine, envp,cwd); 
readStream(process.getInputStream()); 
readStream(process.getErrorStream()); 
process.waitFor(); 

readStream()打開一個新的線程,可能是什麼問題?

回答