'Can't find Android Size Analyzer in Android Studio
According to https://developer.android.com/topic/performance/reduce-apk-size, I should be able to install Android Size Analyzer as a plugin, but nothing shows up.
Android Studio -> File -> Settings -> Plugin -> Marketplace -> search for "Android Size Analyzer"
Solution 1:[1]
UPDATE: 17th May 2022
After a lot of trials, errors & frustration, I was able to make it work. Here are the steps: (for MacOS)
Download the the plugin's zip folder from the Github https://github.com/android/size-analyzer/releases
Extract the zip and add the
size-analyzer
executable and theanalyzer.jar
toUsers/<your_user>/Library/Android/platform-tools
(You can add the above files to any place but I bundled it with platform-tools because this location was already present in my $PATH variable. Wherever you place those two files, please make sure that this location is present in your $PATH variable else it won't work. Don't know how to set path variables? Please refer this https://techpp.com/2021/09/08/set-path-variable-in-macos-guide)
- Now in your Android Studio Terminal, run the following command
size-analyzer check-project <your-path-to-project-directory>
(After above step, If the terminal complains like size-analyzer command not found
, it means your $PATH
variable is not set properly)
After analyzing the entire project, it shows output like this
The result analysis provides lots of suggestions and space saving options. Thank you Google for such amazing plugin : )
=================
OLD : 16th May 2022
The AS plugin Android Size Analyzer is deprecated! It's no more indexed on Plugin Market Place(You cannot install it directly from AS anymore).
I even tried installing the plugin from their GitHub Repo, but all in vain. When adding the plugin to studio from disk, the following error popped up. Maybe you can try downgrading the studio and then install it.
Looks like, we'll be on our own for a while : (
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |