Android Studio':app:mergeDebugResources'FAILED

时间:2016-02-28 16:25:44

标签: android

我刚刚安装了Android Studio,制作了一个项目,当项目正在构建时,我在gardle控制台中遇到了这个错误:

Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources]

Configuration on demand is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72301Library
:app:prepareComAndroidSupportSupportV42301Library
:app:prepareDebugDependencies
:app:compileDebugAidl
:app:compileDebugRenderscript
:app:generateDebugBuildConfig
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets
:app:generateDebugResValues
:app:generateDebugResources
:app:mergeDebugResources
Error: org.gradle.process.internal.ExecException: A problem occurred starting process 'command '/home/krisitown/Programming/SDK/android-sdk-linux/build-tools/19.1.0/aapt''
:app:mergeDebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Error: org.gradle.process.internal.ExecException: A problem occurred starting process 'command '/home/krisitown/Programming/SDK/android-sdk-linux/build-tools/19.1.0/aapt''

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1.585 secs

我唯一做的就是改变

compile 'com.android.support:appcompat-v7:23.0.1'

在依赖项中因为它给了我一个错误,在一些google之后我得出的结论是它给了我一个错误,因为在上一行我有一个加号(+)的版本

编辑:这是我的build.gardle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.5.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

有2个人:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 15
    buildToolsVersion '19.1.0'

    defaultConfig {
        applicationId "com.firstapp.krisitown.myapplication"
        minSdkVersion 15
        targetSdkVersion 15
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

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

1 个答案:

答案 0 :(得分:0)

好吧,显然这个问题是由于我运行的是64位Ubuntu操作系统并且我需要一些额外的软件包,所以如果有人想知道这是这种情况的神秘线解:

sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6

我在这里找到了答案,所以道具给那个回答它的人: Error: Unable to run mksdcard SDK tool