Repositories.cfg could not be loaded. unity

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!!!

3 Likes

Create that file yourself if it’s missing:

Simply open PowerShell and run New-Item ~\.android\repositories.cfg -Force (src).

By the way, is this showing in the console as an actual error (red) that’s hindering you playing/testing or just as a warning (yellow) that can be ignored?
.

13 Likes

I have just seen this warning

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.

1 Like

yeah I get this in latest Unity LTS as a warning

3 Likes

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

1 Like

You need to post is as a thread and not hijack this guy’s thread. Especially since it’s not relevant at all.

6 Likes

try untick this…
7164637--857965--upload_2021-5-22_5-11-59.png

I just fixed this error for myself by correcting the location of my “Keystores Dedicated Location” in Edit → Preferences → ExternalTools at the bottom.

4 Likes

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.

2 Likes

Unity 2020.3.15LTS I get this warning after switching build to Android

2 Likes

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”

3 Likes

Failed to parse user addon file at C:\Users\diabo.android\repositories.cfg
System.Threading.ThreadHelper:ThreadStart ()

1 Like

Thanks man it worked !

2 Likes

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

1 Like

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.

1 Like

In project Settings → Check the “Initialize XR on Startup”

thank you very much, it run good with Unity 2020.3.26f1

what did u change it to exactly?

i did not get ya at all pls explain?