I trying to start application via gradle
task
.
task runDebug(dependsOn: ['installDebug', 'run']) {
}
task run(type: Exec) {
commandLine 'adb', 'shell', 'am', 'start', '-n', 'com.example.myexample/.ui.SplashScreenActivity'
}
But this code don't work and i get error:
a problem occurred starting process 'command 'adb''
However, when i specify the path to adb explicitly, application is started.
task run(type: Exec) {
commandLine 'D:\\android\\android-studio\\sdk\\platform-tools\\adb', 'shell', 'am', 'start', '-n', 'com.example.myexample/.ui.SplashScreenActivity'
}
So how can i get a variable which contains the path and transfer it to commandLine
?