0

I have added Fabric to my application from Android studio via Fabric plugin, after that I could not run my application. It shows following error while running the project.

Error message:

Error:Execution failed for task ':qApp:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-8-oracle/bin/java'' finished with non-zero exit value 1

build.gradle file after included Fabric:

buildscript {
    repositories {
        mavenCentral()
        maven { url 'https://maven.fabric.io/public' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.3.+'
        classpath 'io.fabric.tools:gradle:1.+'
    }
}

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

repositories {
    maven { url 'https://maven.fabric.io/public' }
}

android {
    useLibrary 'org.apache.http.legacy'
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "com.qapp"
        minSdkVersion 14
        targetSdkVersion 21
        multiDexEnabled true
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}
dependencies {
    compile project(':facebookSDK')
    compile project(':payPalDemo1')
    compile project(':uberLibrary')
    compile project(':bSLibrary')
    compile project(':pullToRefresh')
    compile project(':androidmapsutils')

    compile 'com.android.support:appcompat-v7:23.0.1'

    compile 'com.google.android.gms:play-services:+'
    compile 'com.android.support:multidex:1.0.0'
    compile files('libs/android-async-http-1.4.6.jar')
    compile files('libs/cardio.jar')
    compile files('libs/universal-image-loader-1.9.3.jar')
    compile files('libs/UserFormValidation.jar')
    compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
        transitive = true;
    }
}

It was working fine before adding Fabric, how I can resolve this issue? please help me. I am running on Ubuntu Machine.

Murali
  • 1
  • 3

2 Answers2

0

Try to add multiDexEnabled true in your gradle file as below:

    defaultConfig {
...
// Enabling multidex support.
multiDexEnabled true
...
}

After that clean and rebuild your project.

It's work for me.I hope its helps you.

pRaNaY
  • 24,642
  • 24
  • 96
  • 146
0

You app has crossed the dex limit of 65k methods so you need to enable multidex in your app.

add

compile 'com.android.support:multidex:1.0.1' 

to gradle and also add multidex:true

defaultConfig {

multiDexEnabled true

}

Also extend your application class with MultiDexApplication.this and this.

*note - you might wanna remove playservices with more bifurcated version like this link explains, to avoid multidex issues.

Community
  • 1
  • 1
Anirudh Sharma
  • 7,968
  • 13
  • 40
  • 42