一个Android项目的摇篮assembleDebug失败,AAPT错误 [英] Gradle assembleDebug of an Android project fails with aapt error

查看:300
本文介绍了一个Android项目的摇篮assembleDebug失败,AAPT错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想建立一个gradle这个建立一个Android库项目,但目前构建与AAPT错误processDebugRes过程中失败:

I'm trying to establish a gradle build for an Android library project, but currently the build fails during processDebugRes with an aapt error:

:packageDebugAidl UP-TO-DATE
:packageDebugRes UP-TO-DATE
:prepareDebugDependencies UP-TO-DATE
:processDebugManifest UP-TO-DATE
:processDebugRes
ERROR: Unknown option '--output-text-symbols'
Android Asset Packaging Tool

Usage:
 aapt l[ist] [-v] [-a] file.{zip,jar,apk}
   List contents of Zip-compatible archive.

(...)

:processDebugRes FAILED

FAILURE: Build failed with an exception.

本的build.gradle为pretty简单,看起来像这样:

The build.gradle is pretty simple and looks like this:

buildscript {

    repositories { mavenCentral() }
    dependencies { classpath 'com.android.tools.build:gradle:0.1' }
}

apply plugin: 'android-library'

dependencies {

    compile fileTree(dir: 'libs', include: '*.jar')
}

android {

    target = 'android-16'

    defaultConfig {

        versionCode = 16
        versionName = "1.0"
        minSdkVersion = 8
    }
}

顺便说一句,在AAPT的版本是0.2。

BTW, the aapt version is 0.2.

我是新来的整个摇篮的东西,所以在此先感谢如何解决这个问题的任何指针。

I'm new to the whole Gradle thing, so thanks in advance for any pointers on how to solve this problem.

推荐答案

终于发现了问题我自己 - 我使用了Android SDK平台工具的修订14,不修改15 preVIEW,这是需要根据的http://tools.android.com/tech-docs/new-build-system/using-the-new-build-system.

Finally found the problem on my own - I was using revision 14 of the Android SDK platform tools, not the preview of revision 15, which is required according to http://tools.android.com/tech-docs/new-build-system/using-the-new-build-system.

这篇关于一个Android项目的摇篮assembleDebug失败,AAPT错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆