Android Archive Library (aar) vs standard jar

前端 未结 4 2021
青春惊慌失措
青春惊慌失措 2020-11-28 22:22

I\'ve been reading some articles about the new adoption of Gradle as the standard build system for Android apps. Well, coming from standard Java development I usually depend

4条回答
  •  醉话见心
    2020-11-28 22:48

    AAR files are more similar to Jars than to Dlls for the following reason:

    Dlls can be shared across applications where as AARs and jars are packaged in with your app.

    AARs vs Jars:

    The main difference between a Jar and a AAR is that AARs include resources such as layouts, drawables etc. This makes it a lot easier to create self-contained visual components. For example if you have multiple apps that use the same login screen, with Jars you could share classes but not the layout, styles, etc., you still had to duplicate them. With AARs everything is bundled in one neat package.

    In conclusion, AARs are a big step in the right direction.

    Note:
    Similar attempts were made with apk-libs but they are now obsolete as AARs are much better.

提交回复
热议问题