Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle configurations.all ambiguous

I use android studio and gradle to build my project. Since I've released gradle plugin 12, I have a warning in my build.gradle. Gradle does not want to force checking dependencies update any more.

This is my build.gradle warning lines :

configurations.all {     // check for updates every build     resolutionStrategy.cacheChangingModulesFor 0, 'seconds' } 

The message is "Method call is ambiguous"

like image 835
tripple_v Avatar asked Aug 07 '14 08:08

tripple_v


People also ask

Can't resolve all files for configuration Gradle?

This is because of slow internet connection or you haven't configure proxy settings correctly. Gradle needs to download some dependencies , if it cant access the repository it fires this error. All you have to do is check your internet connection and make sure gradle can access the maven repository.

What are Gradle configurations?

A “configuration” is a named grouping of dependencies. A Gradle build can have zero or more of them. A “repository” is a source of dependencies. Dependencies are often declared via identifying attributes, and given these attributes, Gradle knows how to find a dependency in a repository.

How do you resolve transitive dependencies in Gradle?

A variant of a component can have dependencies on other modules to work properly, so-called transitive dependencies. Releases of a module hosted on a repository can provide metadata to declare those transitive dependencies. By default, Gradle resolves transitive dependencies automatically.


1 Answers

This is a bug in the IntelliJ (Android Studio) Gradle plugin that I just reported here: https://youtrack.jetbrains.com/issue/IDEA-141744. The warning is wrong and everything should work fine as expected.

like image 139
Vampire Avatar answered Sep 20 '22 13:09

Vampire