Analyzing the APK

One of the links in that toast is to “analyze” the APK.

Android Studio offers an APK Analyzer tool. Mostly, it exists to help developers see exactly what is in the APK, blended from all of the possible sources (your code, library code, etc.). For developers looking to reduce the size of the APK, the APK Analyzer is great for seeing where the space goes.

To bring up the APK Analyzer, either click that “analyze” link from a fresh build, or choose Build > Analyze APK at any time. The latter will bring up a typical file chooser dialog for you to navigate through the build/ directory to select the APK that you want to analyze:

Android Studio, APK Selection Dialog
Android Studio, APK Selection Dialog

The APK Analyzer then opens in a fresh tab:

Android Studio, APK Analyzer
Android Studio, APK Analyzer

The starter project’s APK is a 3.5MB file. This may seem rather large for an app that does not really do much. That is because:

We will look into how to address that latter problem much later in the book.

The table shows the breakdown of where the space goes. Of note:

We will explore these things much more later in the book and help you see how you might make your app smaller.


Prev Table of Contents Next

This book is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license.