Gradle assembleDebug of an Android project fails with aapt error

时间秒杀一切 提交于 2019-12-10 20:16:14

问题


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.

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
    }
}

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.


回答1:


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.



来源:https://stackoverflow.com/questions/13255098/gradle-assembledebug-of-an-android-project-fails-with-aapt-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!