10

The application was able to execute before updating my android studio,this is the error I am getting:

Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.process.ProcessException:
   org.gradle.process.internal.ExecException: 
    Process 'command 'C:\Program Files\Java\jdk1.8.0_25\bin\java.exe'' finished 
    with non-zero exit value 1
Anthon
  • 69,918
  • 32
  • 186
  • 246
Rim Gazzah
  • 571
  • 1
  • 6
  • 13

8 Answers8

5

If you have support-v4 and support-v7 (with different version) in build.gradle then add this line into your build.gradle at top.

configurations { all*.exclude group: 'com.android.support', module: 'support-v4' }

Also read this

Community
  • 1
  • 1
noman404
  • 928
  • 1
  • 8
  • 23
4

in my case, the

compile 'com.google.android.gms:play-services:+'

in my build.gradle exceeded the 65k method limit.

i changed it to

compile 'com.google.android.gms:play-services-maps:6.5.87'

to fix it (i only need maps in my application)

hope that helps

Lukas Lechner
  • 7,881
  • 7
  • 40
  • 53
3

I got this error today out of nothing, after that i tried to update every single thing available, tried to change my gradle build as suggested here but none of it worked.

After hours of dispair and AS updates, a simple "clean project" and "rebuild project" worked for me.

Community
  • 1
  • 1
Thiago Queiroz
  • 131
  • 1
  • 4
2

Just rebuilding project fixes the issue (Build->Rebuild Project). You can also clean project

Misha Akopov
  • 12,241
  • 27
  • 68
  • 82
1

Do this it really help me! configurations { all*.exclude group: 'com.android.support', module: 'support-v4' } write this inside gradle module. Hope it help!

Madi
  • 1,805
  • 1
  • 15
  • 9
1

I fixed that adding:

compile ('com.facebook.android:facebook-android-sdk:3.22.0@aar'){ exclude module: 'support-v4' }

Ultimo_m
  • 4,724
  • 4
  • 38
  • 60
0

Remove google analytics V2 helps for me

Elnatan Derech
  • 987
  • 2
  • 12
  • 18
-1

Try this :

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.1'
}
John Slegers
  • 45,213
  • 22
  • 199
  • 169