Build APK with Jenkins
Hello. I have a problem with a Jenkins build. when I try to build APK on Jenkins Job. it always return "Execution failed for task ':mergeReleaseResources'." this error message. and it only happen with Jenkins. when Build Apk on Unity editor. it is fine. even using "build scriptableobject". also works fine. I'm stuck with this issue 3 days. and I really really need help. Thank you.
* What went wrong:
Execution failed for task ':mergeReleaseResources'.
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource compilation failed
Output: C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-1\files-1.1\androidx.core.core-1.0.0.aar\1667c2b4c843a60927b340fa0703dc59\res\drawable-xhdpi-v4\notification_bg_low_pressed.9.png: error: file not found.
Answer by kaigangames · Jan 16, 2020 at 07:43 AM
Gradle runs as SYSTEM user in Jenkins, so it uses the system32 path as gradle home, causing the build to fail.
Set your own path using GRADLE_USER_HOME environment variable.
Your answer
Follow this Question
Related Questions
Crash unity when run in device 0 Answers
Unity Package Manager Error 2018.4.21f1 0 Answers
Why does my generated mesh have an offset? 0 Answers
How To Add Virtual Background to ARKit? 0 Answers