Finished with Non Zero Exit Value 3

add this:

android {
    // Other stuffs
    dexOptions {
        javaMaxHeapSize "4g"
    }
}

Increased the HEAP size to 2g or 4g. Filename: build.gradle

android {
        defaultConfig {}

        dexOptions {
              javaMaxHeapSize "4g"
        }

        packagingOptions {
        }

        buildTypes {
        }
   }

Steps:

1.Go to your app build.gradle

2.include the following: dexOptions { javaMaxHeapSize "4g" }


I just change

"compile fileTree(dir: 'libs', include: ['*.jar'])"

to

"provided fileTree(dir: 'libs', include: ['*.jar'])".

It resolved my problem