I try to build Unity project to Android platform via Jenkins.
When I build the project in Unity Editor, it works well - succesfully get my APK.
But if I build the same project in same condition on CLI, it always occurs error like below.
****CommandInvokationFailure: Gradle build failed.
C:/Program Files/Unity/Hub/Editor/2019.2.6f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\OpenJDK\Windows\bin\java.exe -classpath "C:\Program Files\Unity\Hub\Editor\2019.2.6f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-5.6.3.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"
stderr[
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':mergeReleaseResources'.
> 8 exceptions were raised by workers:
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #0: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #1: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #2: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #3: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #4: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #5: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #6: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #7: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at [https://help.gradle.org](https://help.gradle.org/)
BUILD FAILED in 25s
]
stdout[
> Task ![:p](https://forum.unity.com/styles/default/xenforo/clear.png "Stick Out Tongue :p")reBuild UP-TO-DATE
> Task ![:p](https://forum.unity.com/styles/default/xenforo/clear.png "Stick Out Tongue :p")reReleaseBuild
> Task :compileReleaseAidl NO-SOURCE
> Task :compileReleaseRenderscript NO-SOURCE
> Task :checkReleaseManifest
> Task :generateReleaseBuildConfig
> Task ![:p](https://forum.unity.com/styles/default/xenforo/clear.png "Stick Out Tongue :p")repareLintJar
> Task :generateReleaseSources
> Task :javaPreCompileRelease
> Task :mainApkListPersistenceRelease
> Task :generateReleaseResValues
> Task :generateReleaseResources
> Task :mergeReleaseResources FAILED
8 actionable tasks: 8 executed
]
exit code: 1
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
JENKINS.AutoBuilder:GenericBuild(String[], String, BuildTargetGroup, BuildTarget, BuildOptions) (at Assets\AutoBuilder.cs:94)
JENKINS.AutoBuilder![:p](https://forum.unity.com/styles/default/xenforo/clear.png "Stick Out Tongue :p")erformBuildAndroid() (at Assets\AutoBuilder.cs:37)
Does anyone experience this kind of error before?
Iāll apperciate if someone reply me with a solution how to resolve the error.
Version of Unity Iām using is āUnity 2019.2.6fā and Gradle version is 5.6.3.
Thanks.