大概是升级了 2.2.1 之后,编译的时候 Gradle 就下面的错误。
在 stackoverflow 上看到也有这样的情况,根据回答我试过下列的方法但是均无效
这个错误不是每次都出现,但是概率跟高, 10 次编译有 8 次出现这种情况。。
如果出错后 gradle 会一直 loading...直到地老天荒(10.1假期,电脑没关loading...了7天)
只有结束 java.exe 进程,然后重新编译有可能会通过。
不知道大家有没有遇到相同的情况~
Exception in thread "png-cruncher_74" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at D:\Android-sdk\build-tools\23.0.3\aapt.exe can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 10 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:120)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_84" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at D:\Android-sdk\build-tools\23.0.3\aapt.exe can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 10 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:120)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_82" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at D:\Android-sdk\build-tools\23.0.3\aapt.exe can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 10 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:120)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_80" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at D:\Android-sdk\build-tools\23.0.3\aapt.exe can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 10 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:120)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_76" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at D:\Android-sdk\build-tools\23.0.3\aapt.exe can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 10 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:120)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_81" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at D:\Android-sdk\build-tools\23.0.3\aapt.exe can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 10 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:120)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_77" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at D:\Android-sdk\build-tools\23.0.3\aapt.exe can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 10 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:120)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
1
jimmy 2016-11-02 11:43:41 +08:00 1
你这个情况我碰过,那个项目依赖了一堆的第三方库,然后这个错误都是那些第三方库报的。
当时有去查了一下,得到的结果是: 第三方库在使用图像资源的时候,特别是有.9 格式的图像资源,由于这些.9 图像是乱做的,以至于在解析这个.9 资源时出错。 解决方法就是:把所有这些.9 资源严格按照规范重新做一遍即可解决。 |
3
GavinHua 2016-11-02 13:05:36 +08:00
没遇见过,倒是现在只要改动 build.gradle 文件,就会卡一会,看网上说是网络问题,但是全局代理也照样卡。
|
4
jimmy 2016-11-02 13:14:32 +08:00
@micookie 所有,不是一部分,只要有一张.9 文件不正确,全部编译均失败。
我记得当时从 1.3.x 的 gradle 升级到 2.x gradle 就是这个情况。 |
5
micookie OP |