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!

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

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