2

Adding this to my build.gradle:

compile 'com.android.support:support-v4:25.2.0'

Leads to gradle resolving the dependencies for this lib automatically. (I assume this is based on the pom file):

$ gradle -q dependencies

_debugCompile - ## Internal use, do not manually configure ##
\--- com.android.support:support-v4:25.2.0
     +--- com.android.support:support-compat:25.2.0
     |    \--- com.android.support:support-annotations:25.2.0
     +--- com.android.support:support-media-compat:25.2.0
     |    +--- com.android.support:support-annotations:25.2.0
     |    \--- com.android.support:support-compat:25.2.0 (*)
     +--- com.android.support:support-core-utils:25.2.0
     |    +--- com.android.support:support-annotations:25.2.0
     |    \--- com.android.support:support-compat:25.2.0 (*)
     +--- com.android.support:support-core-ui:25.2.0
     |    +--- com.android.support:support-annotations:25.2.0
     |    \--- com.android.support:support-compat:25.2.0 (*)
     \--- com.android.support:support-fragment:25.2.0
          +--- com.android.support:support-compat:25.2.0 (*)
          +--- com.android.support:support-media-compat:25.2.0 (*)
          +--- com.android.support:support-core-ui:25.2.0 (*)
          \--- com.android.support:support-core-utils:25.2.0 (*)

When I explicitly require the jar or the aar version of that package in build.gradle

compile 'com.android.support:support-v4:25.2.0@aar' // or @jar

it breaks the dependency resolution:

$ gradle -q dependencies

_debugCompile - ## Internal use, do not manually configure ##
\--- com.android.support:support-v4:25.2.0

Question: Is this a bug in gradle, or how do I make gradle resolve the dependencies also when using @aar and @jar notation?

electronix384128
  • 6,625
  • 11
  • 45
  • 67
  • 2
    I think this answer < http://stackoverflow.com/a/30071402/3390459 > more or less addresses your question. – emerssso Mar 03 '17 at 00:54
  • Woop Woop! That fixes, it! If you want to create an anwer, feel free, so I can select it ;) Otherwise here is what worked for me `compile ('com.android.support:support-v4:25.2.0@aar') { transitive=true }` – electronix384128 Mar 03 '17 at 01:03

0 Answers0