大概是升级了 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)
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.