【问题标题】:Error:Execution failed for task ':app:dexDebug'. > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException错误:任务“:app:dexDebug”执行失败。 > com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException
【发布时间】:2016-04-03 03:10:25
【问题描述】:

我是第一次使用Android Studio,出现以下错误

Error:Execution failed for task ':app:dexDebug'.
    > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-7-openjdk-amd64/bin/java'' finished with non-zero exit value 2

build.gradle:

 dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        compile project(':tag-cloud')
        compile('com.twitter.sdk.android:twitter:1.8.0@aar') {
            transitive = true;
        }
        compile files('libs/bolts-android-1.2.1.jar')
        compile files('libs/aws-android-sdk-s3-2.2.6.jar')
        compile files('libs/aws-android-sdk-core-2.2.6.jar')
        compile fileTree(dir: 'libs', include: ['*.jar'])
        compile('com.crashlytics.sdk.android:crashlytics:2.5.2@aar') {
            transitive = true;
        }
        compile 'com.android.support:appcompat-v7:23.0.1'
        compile 'com.github.ksoichiro:android-observablescrollview:1.6.0'
        compile 'com.facebook.android:facebook-android-sdk:4.6.0'
        compile 'de.hdodenhof:circleimageview:1.3.0'
        compile 'com.koushikdutta.ion:ion:2.1.6'
        compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.4'
        compile 'com.google.android.gms:play-services:8.4.0'
        compile 'com.android.support:recyclerview-v7:23.0.1'
        compile 'com.nineoldandroids:library:2.4.0'
        compile 'com.android.support:design:23.0.1'
        compile 'com.michaelpardo:activeandroid:3.1.0-SNAPSHOT'
        compile 'de.greenrobot:eventbus:2.4.0'
        compile files('libs/FlurryAnalytics-6.2.0.jar')
        compile 'me.leolin:ShortcutBadger:1.1.3@aar'
    }

您知道问题可能是什么以及如何解决吗?因为我是 Android Studio 的新手,所以对这个问题的一个很好的解释也会很有用。在此先感谢:)

【问题讨论】:

标签: android sdk


【解决方案1】:

此选项可能会解决问题

  • 清理项目
  • 删除build.gradle中所有未使用的依赖项
  • 如果没有解决,请在 gradle config 中声明。

    默认配置 {

    multiDexEnabled true
    

    }

【讨论】:

  • 清理了项目并添加了 multiDexEnabled true。但问题没有解决。得到同样的错误
  • 肯定是因为你的依赖引起了这个问题。确保您的库中有在编译文件命令中指定的文件。并检查依赖项中的每一行编译。
  • 下一个选项是尝试更新其中一些,如果它不会影响像 de.hdodenhof 这样的代码:circleimageview 现在是 2.0.0。
猜你喜欢
  • 1970-01-01
  • 2015-09-30
  • 2016-12-13
  • 2015-05-16
  • 2015-05-09
  • 2016-06-27
相关资源
最近更新 更多