Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question 2021.3.1f1: Android build error: "Another action is already registered..."

Discussion in 'Editor & General Support' started by eaiinfo, May 6, 2022.

  1. eaiinfo

    eaiinfo

    Joined:
    Oct 29, 2014
    Posts:
    7
    I recently updated a project from the 2020 LTS to the 2021 LTS, and am running into an error when attempting to create an android build. I have an ".androidlib" that previously has been built by just letting Unity build it in. (As in, the source itself is actually in the folder.) As well, I make use of an
    IPostGenerateGradleAndroidProject
    to modify my project's final manifest.

    In 2020, all of this worked fantastically. Since upgrading to 2021, though, every time I build, I'm met with the following error:

    Code (CSharp):
    1. Internal build system error. BuildProgram exited with code -2147024809.
    2. System.ArgumentException: Another action is already registered for H:/repos/MyProject/Library/Bee/Android/Prj/Mono2x/Gradle/unityLibrary/MyCustomLibrary.androidlib/build.gradle
    3. New:{
    4.   "Annotation": "ActionGenerateProjectFiles H:/repos/MyProject/Library/Bee/Android/Prj/Mono2x/Gradle/build.gradle (+6 others)",
    5.   "Action": "\"C:\\Program Files\\Unity\\Hub\\Editor\\2021.3.1f1\\Editor\\Data\\Tools\\netcorerun\\netcorerun.exe\" \"C:\\Program Files\\Unity\\Hub\\Editor\\2021.3.1f1\\Editor\\Data\\PlaybackEngines\\AndroidPlayer\\AndroidPlayerBuildProgram.exe\" \"C:/Program Files/Unity/Hub/Editor/2021.3.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/Bee;C:/Program Files/Unity/Hub/Editor/2021.3.1f1/Editor/Data/Tools/BuildPipeline\" invoke_static_method \"Library\\Bee\\artifacts\\csharpactions\\build.gradle_ptuu.info\"",
    6.   "Inputs": [
    7.     "C:/Program Files/Unity/Hub/Editor/2021.3.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools/GradleTemplates/mainTemplate.gradle",
    8.     "C:/Program Files/Unity/Hub/Editor/2021.3.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools/GradleTemplates/launcherTemplate.gradle",
    9.     "C:/Program Files/Unity/Hub/Editor/2021.3.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools/GradleTemplates/baseProjectTemplate.gradle",
    10.     "C:/Program Files/Unity/Hub/Editor/2021.3.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools/GradleTemplates/gradleTemplate.properties",
    11.     "C:/Program Files/Unity/Hub/Editor/2021.3.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools/GradleTemplates/libTemplate.gradle",
    12.     "C:/Program Files/Unity/Hub/Editor/2021.3.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools/GradleTemplates/settingsTemplate.gradle",
    13.     "Library/Bee/artifacts/csharpactions/build.gradle_ptuu.info",
    14.     "C:/Program Files/Unity/Hub/Editor/2021.3.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/AndroidPlayerBuildProgram.Data.dll",
    15.     "C:/Program Files/Unity/Hub/Editor/2021.3.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/AndroidPlayerBuildProgram.exe",
    16.     "C:/Program Files/Unity/Hub/Editor/2021.3.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/modules.asset",
    17.     "C:/Program Files/Unity/Hub/Editor/2021.3.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/NiceIO.dll",
    18.     "C:/Program Files/Unity/Hub/Editor/2021.3.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/Unity.Android.Gradle.dll",
    19.     "C:/Program Files/Unity/Hub/Editor/2021.3.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/Unity.Android.Types.dll",
    20.     "C:/Program Files/Unity/Hub/Editor/2021.3.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/UnityEditor.Android.Extensions.dll"
    21.   ],
    22.   "Outputs": [
    23.     "H:/repos/MyProject/Library/Bee/Android/Prj/Mono2x/Gradle/build.gradle",
    24.     "H:/repos/MyProject/Library/Bee/Android/Prj/Mono2x/Gradle/unityLibrary/build.gradle",
    25.     "H:/repos/MyProject/Library/Bee/Android/Prj/Mono2x/Gradle/launcher/build.gradle",
    26.     "H:/repos/MyProject/Library/Bee/Android/Prj/Mono2x/Gradle/gradle.properties",
    27.     "H:/repos/MyProject/Library/Bee/Android/Prj/Mono2x/Gradle/local.properties",
    28.     "H:/repos/MyProject/Library/Bee/Android/Prj/Mono2x/Gradle/settings.gradle",
    29.     "H:/repos/MyProject/Library/Bee/Android/Prj/Mono2x/Gradle/unityLibrary/MyCustomLibrary.androidlib/build.gradle"
    30.   ],
    31.   "ToBuildDependencies": [
    32.     402
    33.   ],
    34.   "AllowUnexpectedOutput": true,
    35.   "Env": [],
    36.   "DebugActionIndex": -1
    37. }
    38. Existing:{
    39.   "Annotation": "CopyFiles H:/repos/MyProject/Library/Bee/Android/Prj/Mono2x/Gradle/unityLibrary/MyCustomLibrary.androidlib/build.gradle",
    40.   "ActionType": "CopyFiles",
    41.   "Inputs": [
    42.     "H:/repos/MyPackage/Source/Unity Packages/com.my.package/Assets/MyPackage/Runtime/Android/MyCustomLibrary.androidlib/build.gradle"
    43.   ],
    44.   "Outputs": [
    45.     "H:/repos/MyProject/Library/Bee/Android/Prj/Mono2x/Gradle/unityLibrary/MyCustomLibrary.androidlib/build.gradle"
    46.   ],
    47.   "DebugActionIndex": 8
    48. }
    49.    at Bee.TundraBackend.TundraBackend.AddActionImplementation(String actionName, NPath[] targetFiles, NPath[] inputs, String executableStringFor, String[] commandLineArguments, Boolean supportResponseFile, Dictionary`2 environmentVariables, NPath[] rspAndBatchFiles, Boolean allowUnexpectedOutput, Boolean allowUnwrittenOutputFiles, Boolean banContentDigestForInputs, String[] allowedOutputSubstrings, NPath[] unavoidableOutputs, NPath[] targetDirectories, String[] sharedResources, Boolean deleteOutputsBeforeRun, NPath[] filesThatMightBeIncluded, CachingMode cachingMode, NPath[] cachingInputIgnoreList, NPath profilerOutput, String responseFileSeparator)
    50.    at Bee.Core.Backend.AddAction(String actionName, NPath[] targetFiles, NPath[] inputs, String executableStringFor, String[] commandLineArguments, Boolean supportResponseFile, Dictionary`2 environmentVariables, NPath[] rspAndBatchFiles, Boolean allowUnexpectedOutput, Boolean allowUnwrittenOutputFiles, Boolean banContentDigestForInputs, String[] allowedOutputSubstrings, NPath[] unavoidableOutputs, NPath[] targetDirectories, String[] sharedResources, Nullable`1 deleteOutputsBeforeRun, NPath[] filesThatMightBeIncluded, CachingMode cachingMode, NPath[] cachingInputIgnoreList, NPath profilerOutput, String responseFileSeparator)
    51.    at Bee.TundraBackend.TundraBackend.AddCSharpActionImpl(String actionName, NPath[] targetFiles, NPath[] inputs, Object argument, NPath[] targetDirectories, MethodInfo method)
    52.    at Bee.TundraBackend.TundraBackend.AddCSharpAction[TArgument](String actionName, NPath[] targetFiles, NPath[] inputs, Action`2 csharpAction, TArgument argument, NPath[] targetDirectories)
    53.    at AndroidPlayerBuildProgram.Actions.ActionGenerateProjectFiles.Setup(Arguments arguments, IEnumerable`1 inputFiles)
    54.    at AndroidPlayerBuildProgram.AndroidPlayerBuildProgram.SetupGradleProjectFiles()+MoveNext()
    55.    at AndroidPlayerBuildProgram.AndroidPlayerBuildProgram.SetupGradleProject()+MoveNext()
    56.    at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
    57.    at System.Collections.Generic.List`1.AddRange(IEnumerable`1 collection)
    58.    at AndroidPlayerBuildProgram.AndroidPlayerBuildProgram.SetupPlayerBuild()
    59.    at PlayerBuildProgramLibrary.PlayerBuildProgramBase.RunBuildProgram()
    60.    at PlayerBuildProgramTypeWrapper.Run(String[] args)
    61.    at Program.Main(String[] args)
    62. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    63.  
    I can certainly see why it's upset that the actions it describes are conflicting, I'm just not sure what my path forward is to work around this. Any help is appreciated.
     
  2. eaiinfo

    eaiinfo

    Joined:
    Oct 29, 2014
    Posts:
    7