How do you resolve dependency resolution engine wasn't able to find a version warning

Hi, does anyone know how to resolve the warning:
The dependency resolution engine wasn't able to find a version of module <insert module name here> which satisfied all requirements because the graph wasn't stable enough. The highest version was selected in order to stabilize selection. Features available in a stable graph like version alignment are not guaranteed in this case.

Is it because some of my dependencies rely on different versions of the same dependency or something else?

Appreciate any help with this!

Something else, depending on different versions of the same dependency is standard situation and is handled properly by Gradle.

I don’t know where this warning comes from and I have never seen it.

Can you provide an MCVE that reproduces the problem, then maybe someone can spot the problem or tell to report it as error.

Hi @Vampire, I’m also trying to figure out how to prevent this warning. I don’t have reproducer but I know from where the warning comes from (and it scare me a bit). Obviously after 1000 failed attempts of module resolution, this warning is printed. I hope this helps a bit to clear what are the ways how to get rid of the warning.

We don’t do anything special apart from using a handful of BOMs with platform(...).

I was able to get rid of the warnings by using enforcedPlatform instead of platform in my build files.

You got me slightly wrong.
I know the code location where the warning is printed.
I just don’t know which condition causes the conflict resolution to not be able to finish at that spot, so the warning is logged.

Of course forcing versions is an option to mitigate the warning, but usually not the optimal solution. enforcedPlatform should only be used in rare edge cases and never in a library project but at most in an end product build. But even there it should seldomly use it. If it works for you, great. But if you could create an MCVE, it might make sense to open an issue with it.