Finished with non-zero exit value 1 error

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:run’.

Process ‘command ‘C:\Program Files\Java\jre1.8.0_144\bin\java.exe’’ finished with non-zero exit value 1

build.gradle file contains the code

apply plugin : ‘application’

// In this section you declare where to find the dependencies of your project
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
// jcenter()

dependencies {

// This dependency is used internally, and not exposed to consumers on their own compile classpath.
implementation ''

// Use JUnit test framework
testImplementation 'junit:junit:4.12'

compile group: 'org.seleniumhq.selenium', name: 'selenium-java', version: '3.5.3'

testCompile group: 'org.testng', name: 'testng', version: '6.11'


compile group: ‘org.apache.poi’, name: ‘poi’, version: ‘3.16’


mainClassName = ‘testng_classes.WorkPackageWorkFlow’

-> Please help me fixing the issue , thank you

1 Like

I have the same problem,please someone help us!

for kotlin, I solve this problem by put package folder under src/main/kotlin. FYR.