Skip to main content

Calculating SDK size

About SDK size


This is one of the most common questions we receive, so here’s a quick blog post explaining why the answer is “it depends”.

Size affects conversion rates

Customers might not download your app if they think it’s too big. Apple will warn them if an install is larger than 200 MB. Google disallows apps larger than 150MB. Segment reported a reverse correlation between app size and install rate. It’s pretty clear that if you ignore what you put in your app, you could end up hurting conversion directly or indirectly.

Including the dependency

Adding an SDK to your app and measuring the change in size is the most direct way of seeing the impact. In many cases, you can include the dependency, hit build, and observe the size change.

Why is it complicated?

Two words: transitive dependencies. For example, you were to just measure the Persona Inquiry SDK by looking at the Android Artifact (.aar), you’d see that it was only 70 KB!


But when you add the SDK to your project, you’d notice that your app grows by a few megabytes! That’s because the Persona Inquiry SDK depends on other SDKs, many of which depend on other SDKs, and so on.

Fortunately, many build systems (including Android’s Gradle option) resolve redundant dependencies, so you don’t end up with twenty copies of the same common libraries. This also means that if you add some SDK to two different apps, the two apps will probably increase by different amounts. The app that shares more common dependencies with the SDK usually increases less.

Good enough solution: Try the SDK to a starter template app

If you ask “How big is the SDK?”, our best guess is to provide an expected upper-bound which should be on the order of magnitude of the actual answer. This estimate is based on using the platforms starter tutorials.

  1. Create an example app a “New Project” wizard
  2. Measure the size of the APK
  3. Add our SDK
  4. Measure again


This is just a basic example.

The reason we call it an “expected upper-bound” is because our many of our SDKs’ dependencies are popular in the industry: there’s a decent chance you’re already using some of those libraries.


Last updated: