2016-02-28 83 views
1

我剛剛安裝的Android工作室,做了一個項目,當項目正在建設,我得到這個錯誤在gardle控制檯:的Android工作室「:應用程序:mergeDebugResources」失敗

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' 

,因爲這是給我一個錯誤的依賴關係,經過一番谷歌-ING我來,這是給我的錯誤,因爲在之前的行我有一個加號(+)的結論版本

編輯:這是我的EM 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' 
} 
+0

把你的build.gradle –

+0

,你改變編譯「com.android.support:appcompat-v7:23.0.1」 –

+0

您也不妨清理項目(建設>清理項目從Android Studio主菜單)看看是否有幫助。 – CommonsWare

回答

0

好了,顯然這個問題是由,我是運行64位的Ubuntu操作系統造成的事實我需要一些額外的軟件包,所以萬一有人懷疑這裏是這種情況的神祕行求解:

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

我發現這裏的答案,所以道具誰回答了這個問題的傢伙: Error: Unable to run mksdcard SDK tool

相關問題