0

I am trying to build an apk for my project in android studio 2.3.1 but I receive the error below: Error:Execution failed for task ':Dr_Application:transformClassesWithDexForDebug'.

com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Error while executing java process with main class com.android.dx.command.Main with arguments {--dex --num-threads=4 --multi-dex --main-dex-list C:\Users\Nisile\Desktop\Nguvu Kazi New\code\HandyMan\Dr_Application\build\intermediates\multi-dex\debug\maindexlist.txt --output C:\Users\Nisile\Desktop\Nguvu Kazi New\code\HandyMan\Dr_Application\build\intermediates\transforms\dex\debug\folders\1000\1f\main C:\Users\Nisile\Desktop\Nguvu Kazi New\code\HandyMan\Dr_Application\build\intermediates\transforms\jarMerging\debug\jars\1\1f\combined.jar}

my build.gradle is:

 apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.1"
    useLibrary 'org.apache.http.legacy'

    defaultConfig {
        applicationId "com.bluehorntech.drapplication"
        minSdkVersion 10
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
    }

    dexOptions {
        javaMaxHeapSize "2g"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
repositories {
    maven { url "https://raw.githubusercontent.com/smilefam/SendBird-SDK-Android/master/" }
}
dependencies {
    compile 'com.mcxiaoke.volley:library:1.0.6@aar'
    compile files('libs/httpmime-4.1.3.jar')
    compile 'com.android.support:multidex:1.0.1'
    compile project(':datetimepicker-library')
    compile fileTree(include: ['*.jar'], dir: 'libs')

//    compile files('src/libs/org.apache.http.legacy.jar')
//    compile fileTree(dir: 'libs', include: 'Parse-*.jar')
    compile project(':library')
    //noinspection GradleCompatible
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:recyclerview-v7:23.1.1'
    compile 'com.android.support:cardview-v7:23.1.1'
//    compile 'com.parse.bolts:bolts-android:1.+'
    compile 'com.google.android.gms:play-services:9.0.0'
    compile 'com.jakewharton:butterknife:5.1.1'
    compile 'com.google.android.gms:play-services-ads:9.0.0'
    compile 'com.google.android.gms:play-services-auth:9.0.0'
    compile 'com.google.android.gms:play-services-gcm:9.0.0'
    compile 'com.google.firebase:firebase-core:9.0.0'
    compile 'com.squareup.okhttp3:okhttp:3.2.0'
    compile 'com.sendbird.sdk:sendbird-android-sdk:3.0.10'
    /*ald*/
    compile 'com.nineoldandroids:library:2.4.0'
    compile 'com.github.sd6352051.niftydialogeffects:niftydialogeffects:1.0.0@aar'
}
apply plugin: 'com.google.gms.google-services'

I read and tried every possible solution from former threads but still cannot resolve my problem. Please help.

1 Answers1

0

Use this build and clean project
Build screenshot

Jon Saw
  • 7,599
  • 6
  • 48
  • 57
Rasoul Miri
  • 11,234
  • 1
  • 68
  • 78