here is a snippet of my build.gradle:
compile \'com.google.api-client:google-api-client:1.19.0\'
compile \'com.google.apis:google-api-services-oauth2:v2-rev7
I met several causes of this strange behavior of gradle dependencies:
gradle clean dependencies insteadGRADLE_OPTS=-Dorg.gradle.daemon=false -Dorg.gradle.caching=false to avoid the caching or provide these options in the command linedependencies report itself is deceptive as it may not show (neither indicate) the next occurrences of the same the unwanted dependency, reached through other paths. Then excluding the transitive the unwanted dependency from the first path does not work and still shows it on that path, no matter that it came through another (invisible) path. Identify all paths the the unwanted dependency is reached through and exclude it from all of them.
Comment out the first path / dependency run gradle clean dependencies to find the next path the dependency is reached through. Repeat until all such paths found. Then uncomment and exclude the unwanted dependency from all paths identified.