简体   繁体   中英

Android studio - build failed '/home/node/Android/Sdk/build-tools/23.0.2/aapt'' finished with non-zero exit value 1

Suddenly I could not build my projects with Android Studio by this following error. I have attached build.gradle file and SDK installation images, I have tried several hours but I could not get solved. Please help me to solve this problem.

Error:

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

build.gradle file:

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.3.+'
    }
}

apply plugin: 'com.android.application'

android {
    useLibrary 'org.apache.http.legacy'
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "com.qapp"
        minSdkVersion 14
        targetSdkVersion 21
        multiDexEnabled true
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}


dependencies {
    compile project(':facebookSDK')
    compile project(':payPalDemo1')
    compile project(':uberLibrary')
    compile project(':bSLibrary')
    compile project(':pullToRefresh')
    compile project(':androidmapsutils')

    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.google.android.gms:play-services:+'
    compile 'com.android.support:multidex:1.0.0'
    compile files('libs/android-async-http-1.4.6.jar')
    compile files('libs/cardio.jar')
    compile files('libs/UserFormValidation.jar')
}

SDK list 在此处输入图片说明

在此处输入图片说明

Try to add this inside you gradle file:

android {
    useLibrary 'org.apache.http.legacy'
    compileSdkVersion 23   
..... 

    dexOptions {
            javaMaxHeapSize "4g"
    }
}

Try to add this lines in your dependencies:

compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'

And in the defaultConfig, use the same targetSdkVersion of the compileSdkVersion

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM