I have a custom gradle task (Exec type) which is responsible for running Python3 command and this task happens before the buildProcess. When i manually fire assembleDebug command via terminal, task works find and there a successful build. But when I manually click Build->Rebuild or Run->Run in Android Studio, there is following message.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:doSomething'.
> A problem occurred starting process 'command 'Python3''
Following is my gradle task
task doSomething(type:Exec){
workingDir 'scripts'
commandLine 'Python3','playGuitar.py'
}
preBuild.dependsOn(doSomething)
Any help or suggestions will be appreciated.