Execution failed for task ':app:dexDebug'

2020-03-12 04:42发布

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

8条回答
冷血范
2楼-- · 2020-03-12 05:05

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.

查看更多
Summer. ? 凉城
3楼-- · 2020-03-12 05:09

Remove google analytics V2 helps for me

查看更多
The star\"
4楼-- · 2020-03-12 05:10

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

查看更多
forever°为你锁心
5楼-- · 2020-03-12 05:10

Try this :

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.1'
}
查看更多
放我归山
6楼-- · 2020-03-12 05:15

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

查看更多
手持菜刀,她持情操
7楼-- · 2020-03-12 05:16

I fixed that adding:

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

查看更多
登录 后发表回答