cordova build android - aapt timeout

时间:2018-05-12 09:42:36

标签: android cordova ionic2 ionic3 aapt

当我试着运行cordova build android时,我收到以下错误:

Exception in thread "queued-resource-processor_2" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at C:\Users\Ivar\AppData\Local\Android\android-sdk\build-tools\26.0.2\aapt2.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.waitForReadyOrFail(AaptProcess.java:196)
        at com.android.builder.internal.aapt.AaptQueueThreadContext.creation(AaptQueueThreadContext.java:56)
        at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:213)
        at java.lang.Thread.run(Thread.java:745)
Exception in thread "queued-resource-processor_7" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at C:\Users\Ivar\AppData\Local\Android\android-sdk\build-tools\26.0.2\aapt2.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.waitForReadyOrFail(AaptProcess.java:196)
        at com.android.builder.internal.aapt.AaptQueueThreadContext.creation(AaptQueueThreadContext.java:56)
        at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:213)
        at java.lang.Thread.run(Thread.java:745)

我已将超时设置为默认5秒的60秒,并且我的所有防病毒软件都被禁用。

版本:

Android build tools: 26.0.2
Android platform: android-26
Cordova-android: 7.0.0
Node: v6.11.0
Npm: 3.10.10
Java: 1.8.0
Gradle: 3.0
OS: Windows 10

ionic info输出:

Ivar@DESKTOP-9SOKFGU MINGW64 /c/newApp (master)
$ ionic info

cli packages: (C:\Program Files\nodejs\node_modules)

    @ionic/cli-utils  : 1.19.0
    ionic (Ionic CLI) : 3.19.0

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 3.1.9
    Cordova Platforms  : android 7.0.0
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 25.2.5
    Node              : v6.11.0
    npm               : 3.10.10
    OS                : Windows 10

Environment Variables:

    ANDROID_HOME : C:\Users\Ivar\AppData\Local\Android\android-sdk

Misc:

    backend : legacy

0 个答案:

没有答案