android - Android Studio-执行任务失败:app:dexDebug

标签 android android-studio gradle

> apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.0"
    useLibrary  'org.apache.http.legacy'
    packagingOptions {
        exclude 'META-INF/DEPENDENCIES.txt'
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/dependencies.txt'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/LGPL2.1'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/notice.txt'
    }
    defaultConfig {
        applicationId "com.clickaley.eric.restaurants"
        minSdkVersion 11
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
repositories {
    mavenCentral()
    maven { url "http://jzaccone.github.io/SlidingMenu-aar" }
    maven {
        url "https://s3.amazonaws.com/repo.commonsware.com"
    }
}
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile files('libs/gson-2.2.4.jar')
    compile 'com.android.support:appcompat-v7:23.0.0'
    compile 'com.squareup.retrofit:retrofit:1.9.0'
    compile 'com.squareup.okhttp:okhttp:2.2.0'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'de.greenrobot:eventbus:2.4.0'
    compile 'com.fasterxml.jackson.core:jackson-databind:2.4.1'
    compile 'com.fasterxml.jackson.core:jackson-core:2.4.1'
    compile 'com.fasterxml.jackson.core:jackson-annotations:2.4.1'
    compile 'com.squareup.retrofit:converter-jackson:1.9.0'
    compile 'com.nineoldandroids:library:2.4.0'
    compile 'com.daimajia.slider:library:1.1.5@aar'
    compile 'com.google.android.gms:play-services:7.8.0'
    compile 'com.github.jd-alexander:library:1.0.6'
    compile 'com.jeremyfeinstein.slidingmenu:library:1.3@aar'
    compile 'com.github.bmelnychuk:atv:1.2.+'
    compile 'com.android.support:support-v4:23.0.0'
}

无法找出问题出在哪里。
* 什么地方出了错:
任务':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

最佳答案

Here was the problem

去掉:

compile 'com.google.android.gms:play-services:7.8.0' And replacing it with:

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

关于android - Android Studio-执行任务失败:app:dexDebug,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33908934/

相关文章:

java - Android SimpleDateFormat 返回上午和下午的点

java - 如何在 api 18 中使用 keystore 时修复 "java.security.InvalidKeyException: Unsupported key algorithm: EC. Only RSA supported"

android - Gradle同步问题:错误:原因:无法找到到请求目标的有效证书路径

java - 如何添加向右滑动打开抽屉导航

java - 错误 :Timeout waiting to lock buildscript class cache for build file when change minSdkVersion

java - 使用 Java 将 GMT 时间转换为本地时间

java - 简单的 XML 反序列化

android - Gradle 构建 : file not found error

android - 无法在 intellij idea 的设计选项卡中看到 View

java - JAVA Jacoco错误的线路覆盖率