error: The system cannot find the file specified. Jenkins

Viewed 1565

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 Answers

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.

Related