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 androidlib is recreated in the project files and causes an error

Discussion in 'Android' started by Kujji, Oct 1, 2023.

  1. Kujji

    Kujji

    Joined:
    Oct 20, 2021
    Posts:
    109
    I added res.androidlib to Assets\Plugins\Android for storing xml with path data for provider in AndroidManifest.

    But i get error:

    Modifying Android project files failed with output: System.IO.IOException: Cannot create 'D:\Content\Unity\UnityProjects\ModsMinecraft-main\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\res.androidlib'

    because file with the same name already exists. I deleted this library but its recreated, if i change name of added androidlib in Assets\Plugins\Android, then name in \Gradle\unityLibrary also changes and again i get this error.
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,659
    If it's reproducible, could you submit a bug with repro project attached? Thank yuo

    P.S since it's androidlib plugin you can place it anywhere in Unity project, no need to always place it in Assets\Plugins\Android
     
  3. Kujji

    Kujji

    Joined:
    Oct 20, 2021
    Posts:
    109
    Unfortunately i can't attach repro project but i can submit error:

    Modifying Android project files failed with output:
    System.IO.IOException: Cannot create 'C:\Content\Unity\UnityProjects\ModsMinecraft-main\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\res.androidlib' because a file or directory with the same name already exists.
    at System.IO.FileSystem.CreateDirectory (System.String fullPath) [0x00145] in <07ba9f98d9794cf19aca0392570e5637>:0
    at System.IO.Directory.CreateDirectory (System.String path) [0x0002c] in <07ba9f98d9794cf19aca0392570e5637>:0
    at NiceIO.NPath+SystemIOFileSystem.Directory_CreateDirectory (NiceIO.NPath path) [0x00007] in <e9b5f1ad6c07445a89fba7c2d31881e1>:0
    at NiceIO.NPath+WindowsFileSystem.Directory_CreateDirectory (NiceIO.NPath path) [0x00018] in <e9b5f1ad6c07445a89fba7c2d31881e1>:0
    at NiceIO.NPath.CreateDirectory () [0x00026] in <e9b5f1ad6c07445a89fba7c2d31881e1>:0
    at NiceIO.NPath.EnsureDirectoryExists (NiceIO.NPath append) [0x0002b] in <e9b5f1ad6c07445a89fba7c2d31881e1>:0
    at NiceIO.NPath.EnsureParentDirectoryExists () [0x00007] in <e9b5f1ad6c07445a89fba7c2d31881e1>:0
    at NiceIO.NPath.WriteAllText (System.String contents) [0x00001] in <e9b5f1ad6c07445a89fba7c2d31881e1>:0
    at UnityEditor.Android.PostProcessor.ProcessModifyProjectFilesCallbacks.ModifyAndroidProjectFiles (AndroidPlayerBuildProgram.Data.AndroidProjectFileArgs androidProjectFiles) [0x00e70] in <468529ee39154ac0ba542a73f7d11a4c>:0
    at UnityEditor.Android.AndroidBuildPostprocessor.ModifyAndroidProjectCallback (AndroidPlayerBuildProgram.Data.AndroidProjectFileArgs args) [0x00001] in <468529ee39154ac0ba542a73f7d11a4c>:0
    at (wrapper delegate-invoke) System.Action`1[AndroidPlayerBuildProgram.Data.AndroidProjectFileArgs].invoke_void_T(AndroidPlayerBuildProgram.Data.AndroidProjectFileArgs)
    at Bee.BeeDriver.BuildRequest+<>c__DisplayClass63_0`1[T].<RegisterRPCCallback>b__0 (System.Object o) [0x00000] in <2ddc5b9b369743eeb8936be4f2e8eaae>:0
    at Bee.BeeDriver.BeeDriver_RunBackend+<>c__DisplayClass1_0.<ProcessRPCRequest>b__0 () [0x00021] in <2ddc5b9b369743eeb8936be4f2e8eaae>:0
    at System.Threading.Tasks.Task.InnerInvoke () [0x0000f] in <07ba9f98d9794cf19aca0392570e5637>:0
    at System.Threading.Tasks.Task.Execute () [0x00000] in <07ba9f98d9794cf19aca0392570e5637>:0
    --- End of stack trace from previous location where exception was thrown ---

    at Bee.BeeDriver.BeeDriver_RunBackend.ProcessRPCRequest (Bee.BinLog.RPCActionMessage msg, Bee.BeeDriver.BuildRequest+RPCCallback rpcCallback, IPCConnection ipcConnection, System.Threading.Tasks.Task writePipeConnectionTask, Bee.BeeDriver.InternalState state) [0x00102] in <2ddc5b9b369743eeb8936be4f2e8eaae>:0 E
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)
     
  4. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,632
    Can you go to the mentioned directory to see if the re.androidlib is trully there? Are it's contents what you expect them to be?
     
  5. Kujji

    Kujji

    Joined:
    Oct 20, 2021
    Posts:
    109
    Yes res.androidlib is there and its content is what i expect