I am not sure if this can create problems. It is best to do this in order to follow the recommendations in the warning or completely eliminate the addiction (your point number 2, to which I answered below).
I also saw these warnings, in particular, “publicly available”.
Which answer in the thread you are referencing says that you should ignore these dependencies, since the Android APIs already include them (I think, correct me if I am wrong).
For example, if you specifically require commons-logging (or another that gives a similar warning), remove it from your list.
build.gradle file:
dependencies { ... compile 'commons-logging:commons-logging:1.1.3'
In addition, if you have a dependency that requires coupling as a transitive dependency, you should also exclude it.
Example:
dependencies { ... compile 'some.package.that:requires_commons_logging:1.2.3' .... }
becomes
dependencies { ... compile ('some.package.that:requires_commons_logging:1.2.3') { exclude group: 'commons-logging', module: 'commons-logging' } .... }
An easy way to completely exclude it can be done by adding this to your build.gradle file, without excluding it in each dependency:
configurations { all*.exclude group: 'commons-logging', module: 'commons-logging' }
Finally, to look at the dependency tree (and see that each of your dependencies transitively imports independently, which can conflict, which can be very useful), use this command from the root of your project:
./gradlew :your_module_name:dependencies
maraci Aug 22 '14 at 18:36 2014-08-22 18:36
source share