2016-07-09 94 views
0

我一直在得到這個錯誤了兩天,被破壞我的頭靠在牆上: -錯誤:執行失敗的任務「:應用程序:processDebugResources」

Error:Execution failed for task ':app:processDebugResources'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\DEL\AppData\Local\Android\Sdk\build-tools\19.1.0\aapt.exe'' finished with non-zero exit value 1

我已經更新了一切「更新」,但這仍然是竊聽我。我已更新到Android 2.1.2,我在Windows 7中。我試圖用一個片段構建一個空白的活動,我迄今沒有編寫代碼,但該項目不會建立

以下是Android清單文件: -

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="com.example.del.sunshine_testapp_vr1"> 

    <application 
     android:allowBackup="true" 
     android:icon="@mipmap/ic_launcher" 
     android:label="@string/app_name" 
     android:supportsRtl="true" 
     android:theme="@style/AppTheme"> 
     <activity 
      android:name=".MainActivity" 
      android:label="@string/app_name" 
      android:theme="@style/AppTheme.NoActionBar"> 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 

       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity> 
    </application> 

</manifest> 

這裏是gradle這個文件

apply plugin: 'com.android.application' 
android { 
    compileSdkVersion 24 
    buildToolsVersion "19.1.0" 

    defaultConfig { 
     applicationId "com.example.del.sunshine_testapp_vr1" 
     minSdkVersion 16 
     targetSdkVersion 24 
     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:24.0.0-beta1' 
    compile 'com.android.support:design:24.0.0-beta1' 
} 

任何幫助,將不勝感激。

回答

1

你的build.gradle文件顯示buildToolsVersion "19.1.0"它是舊的。您應該將其更改爲您在sdk中使用的最新版本buildToolVersion。因此,現在轉到C:\ Users \ DEL \ AppData \ Local \ Android \ Sdk \ build-tools \目錄,然後在build.gradle文件更改buildToolsVersion "19.1.0"之後找到最新版本的構建工具。現在選擇Tools -> Android -> Sync with Gradle dependency。希望這可能對你有幫助。

+0

工作,我想通了這一點像約5小時前,但感謝你反正 –

1

刪除compile 'com.android.support:appcompat-v7:24.0.0-beta1'
appcompat-v7:24.0.0-beta1
buildToolsVersion "19.1.0"

相關問題