2016-07-09 90 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"

相关问题