Android Gradle Dependency configuration changes

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.