Since this morning I’ve been changing small things in 2 separate individual projects, doing completely individual changes, and they started to fail with this error. It seems this dependency is no longer accessible in the server where gradle is trying to get it.
Save the file then try the build again. Not a perfect solution but it should work until Unity/Android fixes the issue. I’m not sure whether this can become undone by upgrading Unity, but I do know that it has to be done per project.
It’s worth a try. Funny enough I had just created that file to add signing to the Developer Build (google services login needs it). Thanks! I’ll report back!
It seems that every other library inside the plugins folder has it’s own gradle file which doesn’t follow the template (common_lib, native_plugins_lib, etc). So I tried to give each one it’s own build.gradle file with google as the first repository, but it still doesn’t work :S It also doesn’t build locally like in the Cloud Build.
Observe same issue. The strange thing is that project builds fine on one machine, but not the other. All settings are identical for them. @gdespaux2010 your workaround did not work for me. After applying it I now get following error:
> Could not find intellij-core.jar (com.android.tools.external.com-intellij:intellij-core:26.0.1).
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/external/com-intellij/intellij-core/26.0.1/intellij-core-26.0.1.jar```
This still might work. My problem is that there’s a “build.gradle” file inside GooglePlayGamesManifest.plugin which overrides this change in the template. I hate the idea that I need to unpack, change that file and pack it again, just because the jcenter repository has a problem!
My company is having the same issue, started mid afternoon yesterday randomly. I’ll post back when I can test the suggestions in this thread.
EDIT: gdespaux2010’s solution did not work for our project. We use firebase, so it’s likely overriding something. We’ll just have to manually build until this is resolved.
I think the suggested approach works. You just need to make sure that if there’s any library that also needs it, you create your own gradle file there with this or else unity will generate one (the template file doesn’t seem to be used for the libraries).
Initially though, it was still throwing an error from GooglePlayGamesManifest.plugin. There ended up being another hidden build.gradle file inside the plugin (I’m on macOS). Right click the plugin and click on “Show Package Contents” and update any contained build.gradle file.
On Windows, I am not sure how the plugin files are packaged. If it’s an archive, you might want to open it with 7zip or something similar to fix the gradle files.
gdespaux2010’s solution worked only if you have not other plagins in projects.
For each plagin Unity creates a individual build.gradle file wich make issue/ You need to change plagins’ template file by path Data\PlaybackEngines\AndroidPlayer\Tools\GradleTemplates\libTemplate.gradle (in Unity editor folder) to fix whole problem
That sounds like a good approach @IceStormRUS though this will only work locally
Does anyone know of a way to change the libTemplate that runs in Unity Cloud Build?
Hi. The issue happens when the intellij-core-26.0.1.jar hasn’t been cached locally by gradle. It then tries to download the artifact from jcenter and fails - so it might not affect every machine.
Still having the issue. I would imagine this would be simple to fix by placing the file in “jcenter”. Who runs it? And why does gradle think it has it? Shouldn’t it just fallback to google repository?