错误:任务':app:dexDebug'执行失败Android的

时间:2015-08-22 19:21:25

标签: android

通过git导入项目时出错。我尝试通过git导入项目并执行项目,它给了我这个错误:

 com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2

主:

compile 'com.android.support:design:22.2.1'
    compile 'com.google.android.gms:play-services:7.5.0'
    compile 'com.android.support:cardview-v7:22.2.1'
    compile 'com.android.support:recyclerview-v7:22.2.1'
    compile 'com.squareup.picasso:picasso:2.3.2'
    compile 'com.squareup.okhttp:okhttp:2.0.0'
    compile 'com.ocpsoft:ocpsoft-pretty-time:1.0.6'
    compile project(':facebook2')
    compile 'jp.wasabeef:recyclerview-animators:1.2.0@aar'
    compile 'jp.wasabeef:picasso-transformations:1.0.5'
    compile 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.2.3'
    compile 'com.squareup.retrofit:retrofit:1.9.0'
    compile 'com.squareup.okhttp:okhttp-urlconnection:2.0.0'
    compile 'com.squareup.okio:okio:1.0.1'
    compile 'com.android.support:appcompat-v7:22.2.1'
    compile 'com.nineoldandroids:library:2.4.0'

水平:

dependencies {
    compile 'com.android.support:support-v4:18.+'
}

Facebook的:

dependencies {
    compile 'com.android.support:support-v4:[21,22)'
    compile 'com.parse.bolts:bolts-android:1.2.0'
}

1 个答案:

答案 0 :(得分:2)

你看到你的位置:

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

您实际上正在编译Google的所有播放服务,这通常会导致多重错误,这意味着您拥有大量的模块和代码。最好只编译你需要的API,例如,如果你想使用play服务的位置API,只需这样编译:

compile 'com.google.android.gms:play-services-location:7.5.0'