gradle构建失败,出现aapt版本/超时错误

时间:2016-01-13 01:24:28

标签: android gradle aapt multidex android-multidex

我在64位Windows 7上使用gradle 2.9,Android SDK 24.4.1和Build工具23.0.2。我更新了gradle构建脚本以支持multidex(per How to enable multidexing with the new Android Multidex support library)但我遇到了这个构建错误

Exception in thread "stderr" java.lang.RuntimeException: Invalid aapt version, version 21 or above is required
    at com.android.builder.png.AaptProcess$ProcessOutputFacade.err(AaptProcess.java:217)
    at com.android.utils.GrabProcessOutput$1.run(GrabProcessOutput.java:102)

(重复10次以上),然后

Exception in thread "png-cruncher_1" java.lang.RuntimeException: Timed out while waiting for slave aapt process, try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
    at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:104)
    at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:107)
    at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:206)
    at java.lang.Thread.run(Thread.java:745)

(使用不同的png-cruncher_X值(x = 1到20)重复10次以上)

并且构建挂起。我找到了类似的报告(关于超时部分),通过获取某些库的最新版本(Android Studio fails to build new project, timed out while wating for slave aapt process)来修复它,但我在Windows上,我认为我是最新的Android SDK&构建工具。谁知道如何解决这个问题?感谢。

0 个答案:

没有答案