错误:系统找不到指定的文件。Jenkins

huangapple go评论90阅读模式
英文:

error: The system cannot find the file specified. Jenkins

问题

FAILURE: 构建失败,出现异常。

  • 出了什么问题:
    任务 ':app:mergeProdDebugResources' 执行失败。
    > 发生了多个任务操作失败:
    > 在执行 com.android.build.gradle.internal.tasks.Workers$ActionFacade 时发生失败
    > Android 资源编译失败
    AAPT:C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins.jenkins\workspace\Test\app\build\intermediates\res\merged\prod\debug:错误:系统找不到指定的文件。 (2)。

    > 在执行 com.android.build.gradle.internal.tasks.Workers$ActionFacade 时发生失败
    > Android 资源编译失败
    AAPT:C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins.jenkins\workspace\Test\app\build\intermediates\res\merged\prod\debug:错误:系统找不到指定的文件。 (2)。

    > 在执行 com.android.build.gradle.internal.tasks.Workers$ActionFacade 时发生失败
    > Android 资源编译失败
    AAPT:C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins.jenkins\workspace\Test\app\build\intermediates\res\merged\prod\debug:错误:系统找不到指定的文件。 (2)。

    > 在执行 com.android.build.gradle.internal.tasks.Workers$ActionFacade 时发生失败
    > Android 资源编译失败
    AAPT:C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins.jenkins\workspace\Test\app\build\intermediates\res\merged\prod\debug:错误:系统找不到指定的文件。 (2)。

    > 在执行 com.android.build.gradle.internal.tasks.Workers$ActionFacade 时发生失败
    > Android 资源编译失败
    AAPT:C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins.jenkins\workspace\Test\app\build\intermediates\res\merged\prod\debug:错误:系统找不到指定的文件。 (2)。

    > 在执行 com.android.build.gradle.internal.tasks.Workers$ActionFacade 时发生失败
    > Android 资源编译失败
    AAPT:C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins.jenkins\workspace\Test\app\build\intermediates\res\merged\prod\debug:错误:系统找不到指定的文件。 (2)。

    > 在执行 com.android.build.gradle.internal.tasks.Workers$ActionFacade 时发生失败
    > Android 资源编译失败
    AAPT:C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins.jenkins\workspace\Test\app\build\intermediates\res\merged\prod\debug:错误:系统找不到指定的文件。 (2)。

    > 在执行 com.android.build.gradle.internal.tasks.Workers$ActionFacade 时发生失败
    > Android 资源编译失败
    AAPT:C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins.jenkins\workspace\Test\app\build\intermediates\res\merged\prod\debug:错误:系统找不到指定的文件。 (2)。

我在 Jenkins 中使用了下面的命令:assembleDebug -g C:\gradle_home

我该如何解决这个问题?

英文:

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:mergeProdDebugResources'.
    > Multiple task action failures occurred:
    > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
    > Android resource compilation failed
    AAPT: C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins.jenkins\workspace\Test\app\build\intermediates\res\merged\prod\debug: error: The system cannot find the file specified. (2).

    > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
    > Android resource compilation failed
    AAPT: C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins.jenkins\workspace\Test\app\build\intermediates\res\merged\prod\debug: error: The system cannot find the file specified. (2).

    > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
    > Android resource compilation failed
    AAPT: C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins.jenkins\workspace\Test\app\build\intermediates\res\merged\prod\debug: error: The system cannot find the file specified. (2).

    > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
    > Android resource compilation failed
    AAPT: C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins.jenkins\workspace\Test\app\build\intermediates\res\merged\prod\debug: error: The system cannot find the file specified. (2).

    > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
    > Android resource compilation failed
    AAPT: C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins.jenkins\workspace\Test\app\build\intermediates\res\merged\prod\debug: error: The system cannot find the file specified. (2).

    > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
    > Android resource compilation failed
    AAPT: C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins.jenkins\workspace\Test\app\build\intermediates\res\merged\prod\debug: error: The system cannot find the file specified. (2).

    > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
    > Android resource compilation failed
    AAPT: C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins.jenkins\workspace\Test\app\build\intermediates\res\merged\prod\debug: error: The system cannot find the file specified. (2).

    > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
    > Android resource compilation failed
    AAPT: C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins.jenkins\workspace\Test\app\build\intermediates\res\merged\prod\debug: error: The system cannot find the file specified. (2).

i used in jenkins next command: assembleDebug -g C:\gradle_home

How i can solve this problem?

答案1

得分: 3

因为输入的项目文件路径太长,aapt 无法正常工作。
更改 Jenkins 的项目工作目录可以修复此错误。

英文:

because the input project file path is too long, aapt can't work corretly with it.
changing the project workspace dir of jenkins can fix this error.

huangapple
  • 本文由 发表于 2020年9月11日 20:03:19
  • 转载请务必保留本文链接:https://go.coder-hub.com/63846726.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定