android - Execution failed for task ':app:transformClassesWithDexForDebug' - Gradle dependencies? -


i didn't want start new question related issue since know there few already, still haven't found solution , i'm pretty stuck.

i getting error:

error:execution failed task ':app:transformclasseswithdexfordebug'.

com.android.build.api.transform.transformexception: com.android.ide.common.process.processexception: org.gradle.process.internal.execexception: process 'command '/library/java/javavirtualmachines/jdk1.7.0_79.jdk/contents/home/bin/java'' finished non-zero exit value 2

and gradle console showi

unexpected top-level exception: com.android.dex.dexexception: multiple dex files define lbolts/aggregateexception; @ com.android.dx.merge.dexmerger.readsortabletypes(dexmerger.java:579) @ com.android.dx.merge.dexmerger.getsortedtypes(dexmerger.java:535) @ com.android.dx.merge.dexmerger.mergeclassdefs(dexmerger.java:517) @ com.android.dx.merge.dexmerger.mergedexes(dexmerger.java:164) @ com.android.dx.merge.dexmerger.merge(dexmerger.java:188) @ com.android.dx.command.dexer.main.mergelibrarydexbuffers(main.java:504) @ com.android.dx.command.dexer.main.runmonodex(main.java:334) @ com.android.dx.command.dexer.main.run(main.java:277) @ com.android.dx.command.dexer.main.main(main.java:245) @ com.android.dx.command.main.main(main.java:106)

failed

failure: build failed exception.

  • what went wrong: execution failed task ':app:transformclasseswithdexfordebug'.

    com.android.build.api.transform.transformexception: com.android.ide.common.process.processexception: org.gradle.process.internal.execexception: process 'command '/library/java/javavirtualmachines/jdk1.7.0_79.jdk/contents/home/bin/java'' finished non-zero exit value 2

  • try: run --stacktrace option stack trace. run --info or --debug option more log output.

build failed

this build.gradle:

apply plugin: 'com.android.application'  android {     compilesdkversion 23     buildtoolsversion "23.0.2"      defaultconfig {         applicationid "com.andrewnwalker.mousetimes_california"         minsdkversion 15         targetsdkversion 23         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:23.1.1'     compile 'com.android.support:design:23.1.1'     compile 'com.parse.bolts:bolts-android:1.+'     compile filetree(dir: 'libs', include: ['parse-*.jar'])     compile files('libs/parse-1.12.0.jar')     compile files('libs/bolts-tasks-1.3.0.jar')     compile files('libs/universal-image-loader-1.9.5.jar')     compile files('libs/joda-time-2.9.1.jar') } 

i've tried of obvious things such cleaning, rebuilding, opening/closing. i've tried removing of dependencies see if make difference.

as far know didn't change when worked fine. i'm pretty sure ran project second time in row , error appeared. might wrong though.

anyone have suggestions?

recently, encountered same problem , here solution 2 steps:

  1. top level gradle:

    // top-level build file can add configuration options common sub-projects/modules. buildscript { repositories {     jcenter() } dependencies {     classpath 'com.android.tools.build:gradle:2.0.0-alpha3'     classpath 'com.google.gms:google-services:2.0.0-alpha3'//for google libs    }  }  allprojects { repositories {       jcenter()     } } 
  2. module(app) level gradle:

    apply plugin: 'com.android.application'  android { compilesdkversion 23 buildtoolsversion "23.0.2"   defaultconfig {     applicationid "your_app_id"     minsdkversion 9     targetsdkversion 22     // enabling multidex support can (uncomment , test)     //multidexenabled true }  buildtypes {     release {         //minifyenabled true         //shrinkresources true         proguardfiles 'proguard-project.txt'     } }  }   dependencies { //your dependencies } apply plugin: 'com.google.gms.google-services' **//place line @ end if use google service lib.** 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -