Search Unity

Question repositories.cfg could not be loaded. unity

Discussion in 'Android' started by Stephanos33, Dec 27, 2020.

  1. Stephanos33

    Stephanos33

    Joined:
    Dec 27, 2020
    Posts:
    3
    Does anyone know how to solve this annoying error?

    File C:\Users\\.android\repositories.cfg could not be loaded.
    System.Threading.ThreadHelper:ThreadStart()

    It happens after adjusting Unity for AR development. Unity version is 2019.4, all JDK, NDK stuff has been installed, as well as AR Foundation & ARCore??

    Ive seen similar questions being asked before but no real answers!!!
     
  2. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,664
    Last edited: Dec 28, 2020
  3. nick-morhun

    nick-morhun

    Joined:
    May 12, 2015
    Posts:
    51
    I have just seen this warning
     
  4. Xarbrough

    Xarbrough

    Joined:
    Dec 11, 2014
    Posts:
    1,188
    I see the warning appear when I make a build, but also simply when browsing through the Android ProjectSettings. Not always though, so I can't really report it as a bug.
     
    DeveloperJulian likes this.
  5. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,276
    yeah I get this in latest Unity LTS as a warning
     
    PlanarBit, Melanzue and ArunPrakasam like this.
  6. akaycompany99

    akaycompany99

    Joined:
    Mar 23, 2021
    Posts:
    1
    Pls help me ı Get this error for 2 days and ı didnt fix it

    Exception: Unity.IL2CPP.Building.BuilderFailedException: C:\Program Files\Unity\2021.1.0f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++

    I need help
     
    norhan467 likes this.
  7. SpicyCatGames

    SpicyCatGames

    Joined:
    Sep 30, 2019
    Posts:
    14
    You need to post is as a thread and not hijack this guy's thread. Especially since it's not relevant at all.
     
  8. ArunPrakasam

    ArunPrakasam

    Joined:
    Oct 11, 2020
    Posts:
    3
    try untick this...
    upload_2021-5-22_5-11-59.png
     
  9. ReeseEifler

    ReeseEifler

    Joined:
    Oct 3, 2014
    Posts:
    5
    I just fixed this error for myself by correcting the location of my "Keystores Dedicated Location" in Edit -> Preferences -> ExternalTools at the bottom.
     
  10. guneyozsan

    guneyozsan

    Joined:
    Feb 1, 2012
    Posts:
    99
    For me the warning happens the first time I open an Android project after updating to a new minor version of unity 2019 (2019.4.27f1 still shows it).

    Restarting Unity editor removes the warning until next version upgrade.
     
    AzebanUzza and sean244 like this.
  11. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    Unity 2020.3.15LTS I get this warning after switching build to Android
     
    ceriwalsh51 and sfuseronin like this.
  12. Arik_Cool

    Arik_Cool

    Joined:
    Jul 28, 2020
    Posts:
    8
    What I did was - I went to C:\Users\YOUR USER NAME\.android\ and then created a folder name repositories.cfg
    It needs to be exactly the same name. Read the path I have given you and Put your username in "YOUR USER NAME"
     
    sharonj731, sm01hc and sfuseronin like this.
  13. MarkSharpe

    MarkSharpe

    Joined:
    Feb 3, 2021
    Posts:
    27
    Failed to parse user addon file at C:\Users\diabo\.android\repositories.cfg
    System.Threading.ThreadHelper:ThreadStart ()
     
    sma6008 likes this.
  14. Ageless717

    Ageless717

    Joined:
    Nov 7, 2021
    Posts:
    1
    Thanks man it worked !
     
    Guayabazo and MarkSharpe like this.
  15. NiRoU21

    NiRoU21

    Joined:
    Feb 27, 2019
    Posts:
    2
    I had this issues where cant touch any button in any scene of my android project.
    I had a device simulator package running and also my cell phone sometimes running the project on it.
    After adding some packages in my project suddenly the buttons stopped working in the game mode and the device simulator package. Got this error :

    repositories.cfg could not be loaded. unity


    Then connected my android phone and started working both device simulator package adn game mode
     
    sfuseronin likes this.
  16. MarkSharpe

    MarkSharpe

    Joined:
    Feb 3, 2021
    Posts:
    27
    I had a similar problem for whatever reason my android SDK dumped the current api 26 version and demanded 28 but if I recall correctly I had it running on API 31 so I reinstalled 28 and it started working again. Something going on with the android updates coinciding with unity version updates I imagine. Don't give up and don't delete your project.
     
    sfuseronin likes this.
  17. efekantgn

    efekantgn

    Joined:
    Oct 3, 2019
    Posts:
    2
    In project Settings --> Check the "Initialize XR on Startup"
     
  18. pixed

    pixed

    Joined:
    Jan 13, 2018
    Posts:
    3
    thank you very much, it run good with Unity 2020.3.26f1
     
  19. Vegeks

    Vegeks

    Joined:
    Apr 17, 2022
    Posts:
    2
    what did u change it to exactly?
     
  20. Vegeks

    Vegeks

    Joined:
    Apr 17, 2022
    Posts:
    2
    i did not get ya at all pls explain?
     
  21. MattJackB

    MattJackB

    Joined:
    Oct 14, 2018
    Posts:
    37
    Same, did you find a solution?

    EDIT:
    Solution was to use the command line to create a new file at that location. So at 'C:\Users\USER\.android' do 'cd > repositories.cfg' and this should create the file rather than create a folder.
     
    Last edited: May 10, 2022
  22. Noor23

    Noor23

    Joined:
    Feb 19, 2022
    Posts:
    28
    Hi , How did you do it exactly , can you please tell me step by step :)
     
  23. MattJackB

    MattJackB

    Joined:
    Oct 14, 2018
    Posts:
    37
    For windows, just open up Command Prompt and go to C:\Users\USER (change "USER" accordingly), it should already be at that location on start-up anyway (mine is).

    Then type " cd .android " which will take you into the .android folder. Alternatively, you can find this folder using file explorer, then going to File > Open Windows PowerShell. The next step will work using Command Prompt or PowerShell.

    When you're at that location, type " cd > repositories.cfg " to create a .cfg file called repositories (you need to include the > as this isn't to make it easier to read but is part of the command).

    _

    For mac, I don't know exactly because I'm not sure on the location of the .android folder. However you should be able to figure it out yourself by getting to the .android folder using the cd command, and then using the touch command to create a new file. Or you could find the .android folder using the Finder, then open a terminal window at that location, and finally use the touch command to create the file.
     
  24. Noor23

    Noor23

    Joined:
    Feb 19, 2022
    Posts:
    28
    alright , thankyou! :)))),, (sorry but in the user's place should i enter the name of the project or what ? )
     
  25. MattJackB

    MattJackB

    Joined:
    Oct 14, 2018
    Posts:
    37
    I'm sure you've figured it out by now, but just in case anyone else doesn't know:

    User is the account you are using on your computer. Replace USER with whatever your account is named, and it needs to be exact (so if it has caps or spaces etc then include them). On Windows 10 you can easily find what the account is called by using the start menu and hovering over the account icon on the left side.
     
  26. KymCodes

    KymCodes

    Joined:
    Mar 12, 2022
    Posts:
    1
    upload_2022-7-7_0-34-36.png

    Can someone please help me with this error? I only switched from Windows to Android then this error message popped up. I have been searching for a solution but nothing so far have helped me. Everything has been installed correctly. Also, couple months ago, I built and run an android app successfully

    Here's the full error message as well:

    commandWithNoStdoutInvokationFailure: Unable to start ADB server. Please make sure the Android SDK is installed and is properly configured in the Editor. See the Console for more details.
    UnityEditor.Android.Command.RunWithShellExecute (System.String command, System.String args, System.String workingdir, System.String errorMsg) (at <762caba6f98a4d7e9d56f7b5bd6e35d6>:0)
    UnityEditor.Android.ADB.StartServer () (at <762caba6f98a4d7e9d56f7b5bd6e35d6>:0)
    UnityEditor.Android.ADB.Run (System.String[] command, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <762caba6f98a4d7e9d56f7b5bd6e35d6>:0)
    UnityEditor.Android.AndroidDeploymentTargetsExtension.GetKnownTargets (UnityEditor.DeploymentTargets.IDeploymentTargetsMainThreadContext context, UnityEditor.ProgressHandler progressHandler) (at <762caba6f98a4d7e9d56f7b5bd6e35d6>:0)
    UnityEditor.DeploymentTargets.DeploymentTargetManager.GetKnownTargets () (at <68089899e4c84456bfc1de3436accf4a>:0)
    UnityEditor.Android.AndroidBuildWindowExtension+<>c__DisplayClass32_0.<SpawnFetchTargetsThread>b__0 () (at <762caba6f98a4d7e9d56f7b5bd6e35d6>:0)
    System.Threading.ThreadHelper:ThreadStart()
     
  27. sillymonke21_

    sillymonke21_

    Joined:
    Jun 30, 2022
    Posts:
    1
    Do you have the Android SDK installed in your editor?
     
  28. djhatvr

    djhatvr

    Joined:
    Sep 22, 2019
    Posts:
    53
    Yellow can not be ignored. It prevents you from finding library functions...
     
    Karsten likes this.
  29. mahdibensalem

    mahdibensalem

    Joined:
    Oct 30, 2019
    Posts:
    1
    where it should be the correct location?
     
  30. safwan_kurd

    safwan_kurd

    Joined:
    Jan 30, 2023
    Posts:
    1
    It work thank you so much <3
     
  31. mangeshdesh63

    mangeshdesh63

    Joined:
    Mar 22, 2023
    Posts:
    1
    But i already have a file named as "repositories.cfg" in the same location. what should i do ?
     
  32. itpower56

    itpower56

    Joined:
    Jun 24, 2023
    Posts:
    1
    Create a file in the directory at:
    C:\Users\your username\.android
    go to the folder then git bash here with the command like the example below:
    echo > repositories.cfg
     
  33. sharonj731

    sharonj731

    Joined:
    Jun 10, 2018
    Posts:
    8
    This worked for me, to follow the path in the error message and create a new folder named repositories.cfg Thanks!