Error building task (windows only)

HI,

When using linux => no problem
when using windows => I have an error execCommand() == null

task buildLibraries(type: Exec) {
workingDir './libs'
if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows'))
{
    //commandLine 'cmd', '/c', 'build_jar.bat -o install'
}
else
{
    commandLine 'sh', '-c', './build_jar.sh -o install'
}

//store the output instead of printing to the console:
standardOutput = new ByteArrayOutputStream()

//extension method stopTomcat.output() can be used to obtain the output:
ext.output = {
    return standardOutput.toString()
  }
}

Can you help me please

Other question :

How have output scripts in “Build” Tab in Android Studio?

I explain this : script build_jar.sh compile maven project
if I have maven error, I don’t see why in build tab in android studio

Thanks
Best regards
Loïc

Try

commandLine 'cmd /c build_jar.bat -o install'.split(' ') 

hi,

I try but no work

I have same error message

best regards
Loïc

Have you removed the “//” from before the line?
Or does it look like this?

if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows'))
{
    //commandLine 'cmd /c build_jar.bat -o install'.split(' ') 
}

Hi

Yes I remove comment

Best regards

Cordialement
Loïc ROUSSET