In previous versions of gradle-4.0, when a dependency package was introduced, it was done as follows
Compile ' com.facebook.fresco:animated-gif:0.13.0 '
However, the version of Android Studio was updated to version 3.0 of gradle-4.0, and the package dependency configuration statement was modified to the following usage:
Implementation ' com.facebook.fresco:animated-gif:0.13.0' com.facebook.fresco:animated-gif:0.13.0 '
Here are the official Google notes:
Here is the main point of the difference between the implementation and API, the main function of the two statements can be the same as compile the introduction of the dependency package, but in the scope of use is not the same, see.
The meaning is:
Module A uses implementation to rely on the Rxjava library, and then module B then relies on module A. At this point, module A can use Rxjava, but module B makes it less than.
If module a uses APIs that rely on the Rxjava library, both module A and Module B can use Rxjava.
Android Gradle Dependency configuration changes