0

I'm trying to run my application but it is giving above mentioned error. Unable to find solution. Kindly help. Following is my Gradle code.

apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion "24.0.0"

    defaultConfig {
        applicationId "com.example.mabdullahali.trenditch"
        minSdkVersion 15
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:24.1.1'
}
xxx
  • 3,315
  • 5
  • 21
  • 40
  • 3
    Possible duplicate of [Gradle - What is a non-zero exit value and how do I fix it?](http://stackoverflow.com/questions/36698816/gradle-what-is-a-non-zero-exit-value-and-how-do-i-fix-it) – OneCricketeer Aug 02 '16 at 07:45

2 Answers2

1

Add dexOptions in gradle. Hope this will help you .let me know.

    apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion "24.0.0"

    defaultConfig {
        applicationId "com.example.mabdullahali.trenditch"
        minSdkVersion 15
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
    }
    dexOptions {
        incremental = true;
        preDexLibraries = false
        javaMaxHeapSize = "4g"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:24.1.1'
}
OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
Andolasoft Inc
  • 1,296
  • 1
  • 7
  • 16
0

change the value

buildToolsVersion "24.0.0"

to

buildToolsVersion "23.0.1"

or installed Build Tool version seen in SDK Manager