Android appcompat-v7:21错误构建gradle

时间:2014-10-19 07:18:52

标签: android android-gradle build.gradle

我今天已经下载了android API 21 sdk并将支持库更新为21,但每当我尝试构建项目时,gradle会给出此错误消息

  

错误:任务':app:processDebugResources'执行失败。   com.android.ide.common.internal.LoggedErrorException:无法运行命令:       K:\ android-sdk \ build-tools \ 21.0.0 \ aapt.exe包-f --no-crunch -IK:\ android-sdk \ platforms \ android-21 \ android.jar -MK:\ workspace \ MyApplication \ app \ build \ intermediates \ manifests \ full \ debug \ AndroidManifest.xml -SK:\ workspace \ MyApplication \ app \ build \ intermediates \ res \ debug -AK:\ workspace \ MyApplication \ app \ build \ intermediates \ assets \ debug -m -JK:\ workspace \ MyApplication \ app \ build \ generated \ source \ r \ _ debug -FK:\ workspace \ MyApplication \ app \ build \ intermediates \ res \ resources-debug.ap_ --debug-mode --custom -package com.innov8tif.myapplication -0 apk --output-text-symbols K:\ workspace \ MyApplication \ app \ build \ intermediates \ symbols \ debug   错误代码:       -1073741819

任何想法,如果这是android 21 SDK中的错误或我做错了什么 我正在使用android studio 0.8.11

1 个答案:

答案 0 :(得分:6)

您必须将buildToolsVersion更新为21.0.1,将compileSdkVersion更新为21。它位于build.gradle文件中:

android {
    compileSdkVersion 21
    buildToolsVersion '21.0.1'
    ...
}