Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Question Gradle Build Failed (Help!!)

Discussion in 'Android' started by Vyxxen, Apr 5, 2024.

  1. Vyxxen

    Vyxxen

    Joined:
    Sep 27, 2022
    Posts:
    2
    I have been searching for hours trying to figure out why my VR project will not build, and have yet to find a solution. Any advice??

    This project that I am cloning was built in Unity 2021.3.8f1 and I am not allowed to change it.

    Code (csharp):
    1.  
    2. Starting a Gradle Daemon, 2 stopped Daemons could not be reused, use --status for details
    3. > Configure project :launcher
    4. WARNING: The option setting 'android.enableR8=true'':launcher:packageRelease'.
    5. > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
    6.    > com.android.ide.common.signing.KeytoolException: Failed to read key AndroidDebugKey from store "/Users/kyleefriederichs/.android/debug.keystore": Invalid keystore format
    7. * Try:
    8. 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.
    9. * Get more help at https://help.gradle.org
    10. BUILD FAILED in 17s
    11. UnityEngine.GUIUtility:processEvent (int,intptr,bool&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
    12.  
    13.  
    14.  
    15. Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
    16. FAILURE: Build failed with an exception.
    17. * What went wrong:
    18. Execution failed for task ':launcher:packageRelease'.
    19. > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
    20.    > com.android.ide.common.signing.KeytoolException: Failed to read key AndroidDebugKey from store "/Users/kyleefriederichs/.android/debug.keystore": Invalid keystore format
    21. * Try:
    22. 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.
    23. * Get more help at https://help.gradle.org
    24. BUILD FAILED in 17s
    25. UnityEngine.GUIUtility:processEvent (int,intptr,bool&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
    26.  
    27.  
    28.  
    29.  
    30. CommandInvokationFailure: Gradle build failed.
    31. /Applications/Unity/Hub/Editor/2021.3.8f1/PlaybackEngines/AndroidPlayer/OpenJDK/bin/java -classpath "/Applications/Unity/Hub/Editor/2021.3.8f1/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-6.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"
    32. Environment Variables:
    33. DEBUG_ENV_VAR = UnityHub
    34. XPC_FLAGS = 0x0
    35. HEAP_CLIENT_TOKEN_STAGING = 3786794399
    36. __CFBundleIdentifier = com.unity3d.unityhub
    37. AMPLITUDE_API_KEY_GREENBUCKET_DEV = 3ded2a762163603391a425f688f990c8
    38. AMPLITUDE_TOKEN_REDBUCKET_DEV = U4PSN7S7PuYVRODivvdcFwbu8R6IHGqa
    39. SECURITYSESSIONID = 186b0
    40. AMPLITUDE_API_KEY_GREENBUCKET_PROD = c86fea37a9e1d3f0878b96e15b111c7c
    41. JAVA_TOOL_OPTIONS = -Dfile.encoding=UTF-8
    42. SENTRY_ACCESS_TOKEN = 3df78d9e53f8456aa90fbae044ce1a6261421ab1d0014674bc2e933477289017
    43. JAVA_HOME = /Applications/Unity/Hub/Editor/2021.3.8f1/PlaybackEngines/AndroidPlayer/OpenJDK
    44. AMPLITUDE_DEPLOYMENT_KEY_RED_BUCKET_DEV = client-wbjHYrmeSR87GmWOE7LDpf7sUySOIKHm
    45. AMPLITUDE_TOKEN_GREENBUCKET_PROD = yyzPzalJDwrQcYNuOZam0bhKb26WyyhK
    46. AMPLITUDE_API_KEY = 28f3cae0b33b8b3702120c9ed1a935aa
    47. XPC_SERVICE_NAME = application.com.unity3d.unityhub.24843454.24843460
    48. HEAP_CLIENT_TOKEN = 1717415662
    49. AMPLITUDE_API_KEY_STAGING = 83ee04fccc67e4fcc7dd527c4c6f1e21
    50. WOOTRIC_CLIENT_TOKEN = NPS-aa8be4c3
    51. USER = kyleefriederichs
    52. MallocNanoZone = 0
    53. LOGNAME = kyleefriederichs
    54. __CF_USER_TEXT_ENCODING = 0x1F5:0x0:0x0
    55. AMPLITUDE_API_KEY_YELLOWBUCKET_DEV = 48835b4d1f5e342aefe5f016324d296a
    56. PATH = /usr/bin:/bin:/usr/sbin:/sbin
    57. LaunchInstanceID = 52AF6079-7102-4415-A15C-A6879AC5EBBB
    58. SSH_AUTH_SOCK = /private/tmp/com.apple.launchd.40UFgTXwaE/Listeners
    59. AMPLITUDE_API_KEY_YELLOWBUCKET_PROD = e03a9bbe92dc38a88cdb068d24c65b46
    60. AMPLITUDE_TOKEN_REDBUCKET_PROD = QqyoFpcWPi7V17p80_46CF6-sNGRGbHo
    61. AMPLITUDE_TOKEN_YELLOWBUCKET_PROD = Ph-837Q6GNodAkyc2MRkxVPUcjlIET4d
    62. HOME = /Users/kyleefriederichs
    63. TMPDIR = /var/folders/kg/fxv7_8tj2wvfd422l26tkfc00000gn/T/
    64. ORIGINAL_XDG_CURRENT_DESKTOP = undefined
    65. AMPLITUDE_TOKEN_GREENBUCKET_DEV = 84H2gMm_FJzhr3mBaX1lM1JVukmCM7d9
    66. AMPLITUDE_TOKEN_YELLOWBUCKET_DEV = wKi8foVigDditGFvmZewRFWsEbX9Y0YO
    67. SHELL = /bin/zsh
    68. AMPLITUDE_API_KEY_REDBUCKET_PROD = ca12bb461ea96f9bdf5df4ded7d52994
    69. AMPLITUDE_DEPLOYMENT_KEY_RED_BUCKET_PROD = client-zH8Y7OK1i331EKuG77C6UxN8ygcM6LzS
    70. COMMAND_MODE = unix2003
    71. AMPLITUDE_API_KEY_REDBUCKET_DEV = 46b8b46515e7632fc42a504b72e05fd0
    72. stderr[
    73. Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
    74. FAILURE: Build failed with an exception.
    75. * What went wrong:
    76. Execution failed for task ':launcher:packageRelease'.
    77. > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
    78.    > com.android.ide.common.signing.KeytoolException: Failed to read key AndroidDebugKey from store "/Users/kyleefriederichs/.android/debug.keystore": Invalid keystore format
    79. * Try:
    80. 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.
    81. * Get more help at https://help.gradle.org
    82. BUILD FAILED in 17s
    83. ]
    84. stdout[
    85. Starting a Gradle Daemon, 2 stopped Daemons could not be reused, use --status for details
    86. > Configure project :launcher
    87. WARNING: The option setting 'android.enableR8=true''UnityEditor.Build.BuildFailedException' was thrown.
    88. UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at <4a8943a7ff7048deb64e0a5059f78d1d>:0)
    89. UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <4a8943a7ff7048deb64e0a5059f78d1d>:0)
    90. UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, AndroidPlayerBuildProgram.Data.AndroidPlayerBuildProgramOutput buildProgramOutput) (at <4a8943a7ff7048deb64e0a5059f78d1d>:0)
    91. UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <4a8943a7ff7048deb64e0a5059f78d1d>:0)
    92. UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.Int32 subtarget, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:370)
    93. UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
    94.  
    95.  
    96.  
    97. Build completed with a result of 'Failed' in 83 seconds (83391 ms)
    98. UnityEngine.GUIUtility:processEvent (int,intptr,bool&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
    99.  
    100.  
    101.  
    102. UnityEditor.BuildPlayerWindow+BuildMethodException: 4 errors
    103.   at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002ce] in /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:193
    104.   at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:94
    105. UnityEngine.GUIUtility:processEvent (int,intptr,bool&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
     

    Attached Files:

    Last edited by a moderator: Apr 5, 2024
  2. IGuscin

    IGuscin

    Unity Technologies

    Joined:
    May 12, 2022
    Posts:
    117
    Error is on the signing step, failing to read keystore. Try removing "/Users/kyleefriederichs/.android/debug.keystore" and build again, that should recreate debug.keystore