0
buildscript {
    repositories {
        maven { url 'http://download.crashlytics.com/maven' }
    }

    dependencies {
        classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.+'
    }
}
apply plugin: 'android'
apply plugin: 'crashlytics'

repositories {
    maven { url 'http://download.crashlytics.com/maven' }
}

dependencies {
    compile fileTree(dir: "$buildDir/native-libs", include: 'native-libs.jar')
    compile fileTree(dir: 'libs', include: '*.jar')
    compile project(':Q-municate_core')
    compile project(':cropper')
    compile project(':stickyListHeaders')
    compile "com.nostra13.universalimageloader:universal-image-loader:${rootProject.universalImageLoaderVersion}"
    compile "com.google.android.gms:play-services:7.5.0"
    compile('de.keyboardsurfer.android.widget:crouton:1.8.4@aar') {
        exclude group: 'com.google.android', module: 'support-v4'
    }
    compile "com.nineoldandroids:library:${rootProject.nineoldandroidsVersion}"
    compile 'com.github.chrisbanes.actionbarpulltorefresh:library:+'
    compile 'com.crashlytics.android:crashlytics:1.+'

}

android {
    compileSdkVersion rootProject.compileSdkVersion
    buildToolsVersion rootProject.buildToolsVersion
    defaultConfig {
        minSdkVersion rootProject.minSdkVersion
        targetSdkVersion rootProject.targetSdkVersion
        versionCode rootProject.versionCode
        versionName rootProject.versionName
    }
    buildTypes {
        release {
            debuggable rootProject.prodDebug
            signingConfig signingConfigs.debug
            minifyEnabled false
            proguardFile 'proguard.cfg'
        }
    }
    packagingOptions {
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
    }
    lintOptions {
        abortOnError false
    }
}

This is my build.gradle file I couldn't understand where I go wrong please help in this way.

when I compile this file I got the error

org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_72\bin\java.exe'' finished with non-zero exit value 2
curiousMind
  • 2,812
  • 1
  • 17
  • 38
  • 1
    is it showing multidex error?? – curiousMind Dec 04 '15 at 12:37
  • Post your full error – curiousMind Dec 04 '15 at 12:38
  • Thanks for the reply, I am getting the error Error:Execution failed for task ':Q-municate_app:dexDebug'. > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_72\bin\java.exe'' finished with non-zero exit value 2 – Prakash Seef Dec 04 '15 at 12:38
  • you are getting this error because your implemented dependencies may be conflicted...try to remove some and check which one is conflicting – H Raval Dec 04 '15 at 13:33

4 Answers4

0

I can't see your buildToolsVersion in the gradle. Have the latest build told version and also remove the unnecessary dependencies.

Follow this.

Community
  • 1
  • 1
cgr
  • 4,578
  • 2
  • 28
  • 52
0

You added dependency in wrong gradle file. see here two types of gradle

enter image description here

add dependency in build.gradle(Module : app)

and for understanding its feature use this link

build.gradle(Module:app) have to be like this-->

enter image description here

and project gradle file have to be like this --->

enter image description here

if any dependency you want to add then add in build.gradle(app)

curiousMind
  • 2,812
  • 1
  • 17
  • 38
0

It's because one of the libraries that you are adding contains a compile error. try to remove each time one library and compile, you can know than which of them is causing the error.

I think you should start with nineoldandroids library.

Josh Crozier
  • 233,099
  • 56
  • 391
  • 304
Fakher
  • 2,098
  • 3
  • 29
  • 45
0

This error is all about you have many huge libraries. So your method count is higher than 65k. It makes your dex file is large. This is why you are taking a error while executing "dexDebug".

Solution is quite simple. You should implement Multidex.

Emre Aktürk
  • 3,306
  • 2
  • 18
  • 30