"Failed to resolve" when using in multi-module project and gradle 5.6
See original GitHub issueWhen I start the task in the root project, I get these errors before the report is generated:
Failed to resolve :module1:debugAndroidTestCompileClasspath
Failed to resolve :module1:debugCompileClasspath
Failed to resolve :module1:debugUnitTestCompileClasspath
Failed to resolve :module1:releaseCompileClasspath
Failed to resolve :module1:releaseUnitTestCompileClasspath
Failed to resolve :module2:debugAndroidTestCompileClasspath
Failed to resolve :module2:debugCompileClasspath
Failed to resolve :module2:debugUnitTestCompileClasspath
Failed to resolve :module2:releaseCompileClasspath
Failed to resolve :module2:releaseUnitTestCompileClasspath
....
I am defining my dependencies in a buildSrc
module via the Kotlin dsl and then use those defined dependencies in all other modules. Could this cause that error? Is this a known error and can it be fixed?
Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Comments:20 (10 by maintainers)
Top Results From Across the Web
Customizing resolution of a dependency directly
In order to determine the project dependencies that are inputs to a task, Gradle needs to resolve the Configuration inputs.
Read more >Executing Multi-Project Builds - Gradle User Manual
To identify the project structure, you can use gradle projects command. As an example, let's use a multi-project build with the following structure:....
Read more >Upgrading your build from Gradle 6.x to the latest
Try to run the project and debug any errors using the Troubleshooting Guide. ... Encountering 'Could not find method X for arguments Y...
Read more >Declaring Dependencies between Subprojects
The api project has a dependency on the shared project. It has no build script and gets nothing injected by another build script....
Read more >Upgrading your build from Gradle 5.x to 6.0
Previously, Gradle did not prevent using the name “buildSrc” for a subproject of a multi-project build or as the name of an included...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for the quick reply. I was using an old version of the plugin (and it obviously couldn’t tell me that it was outdated). On the latest version, everything works fine (even on a multi-module project). But if you’re still interested, this was the exception (thrown for every “Failed to resolve”):
I have noticed that some repositories, like Sonatype’s snapshots repo, will rate limit queries and slow down resolution. Gradle now lets you specify that a repository only applies to certain artifacts to speed up searches. You might look at the info/debug logs if it becomes frustrating.