2016-02-25 63 views
2

突然之間,我無法通過以下方式使用Android Studio構建項目錯誤。我附加了build.gradle文件和SDK安裝映像,我嘗試了幾個小時,但無法解決。請幫我解決這個問題。Android studio - 編譯失敗'/home/node/Android/Sdk/build-tools/23.0.2/aapt''以非零退出值結束1

錯誤:

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文件:

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列表 enter image description here

enter image description here

回答

0

嘗試添加這裏面你gradle這個文件:

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

    dexOptions { 
      javaMaxHeapSize "4g" 
    } 
} 
0

嘗試添加該線在你的依賴:

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

而在defaultConfig,使用compileSdkVersion相同targetSdkVersion

相關問題