0

Error:Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Lcom/android/volley/VolleyError; Error:Execution failed for task ':app: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 --output C:\Users\Admin\Downloads\Compressed\android-project-master\android-project-master\FuraFilaRestaurante\app\build\intermediates\transforms\dex\debug\folders\1000\1f\main C:\Users\Admin\Downloads\Compressed\android-project-master\android-project-master\FuraFilaRestaurante\app\build\intermediates\pre-dexed\debug\debug_8aeaaafa5c6d5384bfd454910cc83d5ff83fa840.jar C:\Users\Admin\Downloads\Compressed\android-project-master\android-project-master\FuraFilaRestaurante\app\build\intermediates\pre-dexed\debug\support-annotations-23.0.0_0dab550717daaa39038e18a12569b8e6e59c66a3.jar C:\Users\Admin\Downloads\Compressed\android-project-master\android-project-master\FuraFilaRestaurante\app\build\intermediates\pre-dexed\debug\classes_ef825ab67fb07bdeb9a193454b1d86c34a6de410.jar C:\Users\Admin\Downloads\Compressed\android-project-master\android-project-master\FuraFilaRestaurante\app\build\intermediates\pre-dexed\debug\internal_impl-23.0.0_4fd9037368ca1910431d60d68541b9cbe7359db9.jar C:\Users\Admin\Downloads\Compressed\android-project-master\android-project-master\FuraFilaRestaurante\app\build\intermediates\pre-dexed\debug\library-1.0.19_725edc60641ff5dbb87f7858f19da7a143a493d1.jar C:\Users\Admin\Downloads\Compressed\android-project-master\android-project-master\FuraFilaRestaurante\app\build\intermediates\pre-dexed\debug\classes_f9e2c446de8e342bd59b5e7a7d604b3f69ad8d54.jar C:\Users\Admin\Downloads\Compressed\android-project-master\android-project-master\FuraFilaRestaurante\app\build\intermediates\pre-dexed\debug\volley_7e1221791a2312310bbb4be60825742b2761dd4a.jar}

    this app gradle file
apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion '25.0.0'

defaultConfig {
    applicationId "furafila.furafilarestaurante"
    minSdkVersion 15
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 
  'proguard-rules.pro'
    }
   }
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.0.0'
compile files('libs/volley.jar')
compile 'com.mcxiaoke.volley:library:1.0.19'

}

2 Answers2

2

Multiple dex files define Lcom/android/volley/VolleyError;

compile files('libs/volley.jar')
compile 'com.mcxiaoke.volley:library:1.0.19'

Two same Library in your build.gradle section. Remove one of them

NOTE

You should use below volley version because com.mcxiaoke is deprecated.

 compile 'com.android.volley:volley:1.1.0'
IntelliJ Amiya
  • 74,896
  • 15
  • 165
  • 198
1

Add multiDexEnabled true in your defaultConfig

Like this

 defaultConfig {
        applicationId "furafila.furafilarestaurante"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
    }
Siddharth Patel
  • 205
  • 1
  • 13