Python3 コマンドの実行を担当するカスタム gradle タスク (Exec タイプ) があり、このタスクは buildProcess の前に発生します。ターミナル経由で assembleDebug コマンドを手動で起動すると、タスクが検出され、ビルドが成功します。しかし、Android Studio で Build->Rebuild または Run->Run を手動でクリックすると、次のメッセージが表示されます。
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:doSomething'.
> A problem occurred starting process 'command 'Python3''
以下は私のgradleタスクです
task doSomething(type:Exec){
workingDir 'scripts'
commandLine 'Python3','playGuitar.py'
}
preBuild.dependsOn(doSomething)
ヘルプや提案をいただければ幸いです。