2017-07-18 10 views
0

Gradleのexecを見つけることができませんでした:WindowsののGradle Execは:コマンド

task runTest(type: Exec) { 
    workingDir "$buildDir/test" 
    commandLine 'test.bat' 
} 

エラーでコマンドを見つけることができません。

Caused by: java.io.IOException: Cannot run program "test.bat" (in directory 
"e:\foo\build\test"): CreateProcess error=2, The system cannot find the file 
specified 

しかし、TEST.BATはディレクトリの下にあります。 docsのよう

task runTest(type: Exec) { 
    workingDir "$buildDir/test" 
    commandLine 'cmd', '/c', 'test.bat' 
} 

を:私はあなたが試してみてくださいでしたディレクトリに移動し、手動で

答えて

0

をコマンドを実行することができます。

+0

ありがとうございました。できます。 – Sunnyday