android - Transient dependencies with Gradle & Google Cast -
i updated android-app buildtoolsversion "23.0.1" , wanted update libraries required casting chromecast.
those libraries are:
dependencies { compile 'com.android.support:appcompat-v7:23.1.0' compile 'com.android.support:mediarouter-v7:23.1.0' compile 'com.google.android.gms:play-services-cast:7.8.0' }
after testing while versions (play-services-cast:8.1.0 introduces proguard-problems), realized can this dependencies:
dependencies { compile 'com.google.android.gms:play-services-cast:7.8.0' }
so means, appcompat & mediarouter seem transient dependencies of play-services-cast.
who can tell me happens , what's recommended way?
- declare appcompat, mediarouter + play-services-cast before because transient dependency omitted?
- just use play-services-cast , use transient dependencies appcompat & mediarouter?
what version of appcompat & mediarouter used if declare them myself? or multiple versions used?
first, please update play services 8.1.0; out , has number of improvements. main question. can tree of dependencies running gradle dependencies
. let's assume have simple project depends on cast, media router , appcompat. if not add last 2 dependencies, here gradle reports dependency tree:
_debugcompile - ## internal use, not manually configure ## \--- com.google.android.gms:play-services-cast:8.1.+ -> 8.1.0 +--- com.google.android.gms:play-services-base:8.1.0 | \--- com.google.android.gms:play-services-basement:8.1.0 | \--- com.android.support:support-v4:22.2.0 | \--- com.android.support:support-annotations:22.2.0 \--- com.android.support:mediarouter-v7:22.2.0 \--- com.android.support:appcompat-v7:22.2.0 \--- com.android.support:support-v4:22.2.0 (*)
so can see, 8.1.0 version of cast play services, grabbing v22.2.0 of support libs. since available in local repository (as part of android sdk), finds , can compile project without adding explicit appcompat , mediarouter dependencies. however, if go local repository (e.g. in <sdk_home>/extras/android/m2repository/com/android/support/mediarouter-v7
, rename 22.2.0
directory there holds v22.2.0 of media router , try compile project again, fails. if add dependencies on appcompat , mediarouter (v23.1) build gradle, finds new libraries , uses those; here gradle dependencies
tree:
_debugcompile - ## internal use, not manually configure ## +--- com.android.support:appcompat-v7:23.1.+ -> 23.1.0 | \--- com.android.support:support-v4:23.1.0 | \--- com.android.support:support-annotations:23.1.0 +--- com.android.support:mediarouter-v7:23.1.+ -> 23.1.0 | +--- com.android.support:appcompat-v7:23.1.0 (*) | \--- com.android.support:palette-v7:23.1.0 | \--- com.android.support:support-v4:23.1.0 (*) \--- com.google.android.gms:play-services-cast:8.1.+ -> 8.1.0 +--- com.google.android.gms:play-services-base:8.1.0 | \--- com.google.android.gms:play-services-basement:8.1.0 | \--- com.android.support:support-v4:22.2.0 -> 23.1.0 (*) \--- com.android.support:mediarouter-v7:22.2.0 -> 23.1.0 (*)
which news; answer question, include up-to-date version of dependencies since fix old bugs , have newer features in them.
Comments
Post a Comment