Lint GradleCompatible and dependencies

520 Views Asked by At

Some dependencies like com.android.support libraries must use the same versions in all libraries. The lint error GradleCompatible states that there can be runtime crashes if the versions differs. This Lint check has been around for a while, I did no see it in the project I work on until recently, maybe support lib 25.0

The dependencies may not always be in sync with the version in the main project and eachother. This is a problem where the dependencies cannot be controlled. In the project RunnerUp there are two projects that are open source and can be compiled manually (MapBox, GraphView) - assuming that the dependencies can be updated or downgraded. However there are two Google dependencies that uses separate versions: com.google.android.support:wearable:1.4.0 (23.0.1) and com.google.android.gms:play-services-wearable:10.0.1 (24.0.0)

How should GradleCompatible be handled, is there any solution or should the error just be suppressed?

A little more info in a pull request for an attempt to workaround (maybe without any effect).

https://github.com/jonasoreland/runnerup/pull/519

Edit: It seem like adding the offending support libraries will cause the libraries to be compatible.

Snippet (see PR for details).

app: //support-v4 is not used by app source but wearable, mapbox //force same version as in the app latestCompile "com.android.support:support-v4:${rootProject.ext.supportLibrary}"

0

There are 0 best solutions below