DEV Community

Victor Rattis
Victor Rattis

Posted on

2 1

The Price of using AndroidX.

Currently, It is recommended by Google to use AndroidX in our project to make it compatible with many Android versions.

"AndroidX is a major improvement to the original Android Support Library, which is no longer maintained. androidx packages fully replace the Support Library by providing feature parity and new libraries." (link)

Is there a price for that? Let's consider the following points...

Simple Hello World with 'androidx"

Alt Text

  • APK Size: 1.6 MB;
  • AndroidX Size has ~1.5 MB;
  • It has >10K methods (remembering in enabling the multi-dex if your app exceeds over 64K methods).

Simple Hello world without 'androidx'

Alt Text

  • APK Size has 102.7 KB.

Keep in mind: A dependency always has a price in a project and I think this should be taken into consideration before using it.

Just think about!

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs