Android Studio停留在Gradle Build Running中,在等待slave aapt进程错误时显示超时

时间:2017-08-02 14:07:28

标签: android android-studio android-gradle aapt

构建gradle时出现以下错误。

Exception in thread "png-cruncher_2" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at C:\Users\USER\AppData\Local\Android\Sdk\build-tools\26.0.1\aapt.exe can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 60 seconds
    at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
    at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:121)
    at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:205)
    at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_5" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at C:\Users\USER\AppData\Local\Android\Sdk\build-tools\26.0.1\aapt.exe can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 60 seconds
    at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
    at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:121)
    at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:205)
    at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_4" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at C:\Users\USER\AppData\Local\Android\Sdk\build-tools\26.0.1\aapt.exe can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 60 seconds
    at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
    at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:121)
    at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:205)
    at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_1" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at C:\Users\USER\AppData\Local\Android\Sdk\build-tools\26.0.1\aapt.exe can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 60 seconds
    at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
    at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:121)
    at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:205)
    at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_3" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at C:\Users\USER\AppData\Local\Android\Sdk\build-tools\26.0.1\aapt.exe can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 60 seconds
    at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
    at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:121)
    at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:205)
    at java.lang.Thread.run(Thread.java:745)

同时执行aapt.exe文件时会在DOS中打开并显示文本“Ready”并卡在那里。

Image

我在使用Android Studio版本2.3.3的Windows 7上 Gradle版本:3.3 buildtoolversion:26.0.1 Android插件版本:2.3.3

此外,drawable文件夹中的所有图像文件都显示为.png格式。

任何帮助将不胜感激。谢谢。

0 个答案:

没有答案