com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon : Daemon startup failed

I set the classpath value as you wrote above, but still it emit the same error. Anyway thanks to your advice @ho-dragon

Besides your solution, I found another solution to fix the issue.

  1. In my Unity auto build script, I set like
    buildPlayerOptions.options = BuildOptions.AcceptExternalModificationsToPlayer;.
    The option I set means that I’ll export the Unity project as gradle build project.
  2. After fixing my autobuild script, I set Gradle build workflow on my Jenkins just after Unity build plugin with options like below image.

Now Jenkins works like below steps.

  1. Export Gradle build project from Unity
  2. Build Gradle project and create release APK.

It works at last!!!

Still I definitely don’t have any idea why internal Unity Gradle build fails in Jenkins, but I’m relieved to find the way to bypass the issue.

Thanks.

1 Like