android - 错误 :Newer :Execution failed for task ':app:dexDebug' . com.android.ide.common.process.ProcessException

标签 android import build.gradle

Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/volume1/Android Studio/android-sdk-linux/build-tools/23.0.2/aapt'' finished with non-zero exit value 1

渐变:

     apply plugin: 'com.android.application'

android {

    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'
    }
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "com.ibussinesscard"
        multiDexEnabled true
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'


   // compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:appcompat-v7:23.1.0'

}

-- 我已经尝试了 stack-overflow 和 Google 上所有可能的解决方案..

-- 我在解决进口方面有问题..

--重建或清理或更改 buildToolVersion 对我不起作用

-- 重新启动或构建-->Make 项目也不适合我

-- multiDexEnabled true 也不起作用

enter image description here

最佳答案

添加

  1. multiDexEnabled true

  2. 调用v7:23.1.0

试试这个

 android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "com.ibussinesscard"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.0'

}

然后Clean-Rebuild-Sync您的项目。

关于android - 错误 :Newer :Execution failed for task ':app:dexDebug' . com.android.ide.common.process.ProcessException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35745043/

相关文章:

android - 有没有办法从 Android 的 Assets 文件夹中将文件作为 File 对象打开?

android - 为 FCM 存储 token

android - Picasso 加载位图后,如何为它获取调色板?

java - IntelliJ 中代码的自定义格式

android - 编译器看不到新方法名称 - 构建问题但运行时错误。 "java.lang.IllegalStateException: Could not find a method"

android - 为什么Project的build.gradle没有显示?

android - ViewPager(带 TabHost)Fragment GetItem 被多次调用

sql-server - SQL Server 导入 - 奇怪的数字

python - 导入错误 : No module named schedule

android - 任务 ':app:dexDebug' 执行失败。不确定可能是 httpclient 和 httpmime 之间的依赖性问题