Description
android-resource-remover is a command-line utility that removes unused resources from an Android app, using the output of Android Lint. Its goal is to reduce APK size and keep the project free of unused files. You run it from the app's root directory, or point it at the app with the --app option. It reads the list of unused resources that Lint reports, and it removes them. Because resources can refer to one another, one run can leave new unused files behind, so the README says you can run it several times in a row, and the authors ran it up to four times. For Gradle projects, you run lint in the build and pass the lint results XML file to the remover with the --xml option. The options include --lint to point at a custom lint command, --app for the app's path, --xml to reuse an existing lint result without running lint, and --ignore-layouts to skip the layout directory. The README warns that after a removal, code that refers to an old layout ID will fail to compile, and the fix is to remove those references. It is installed with pip, and the requirements are Python 2.7 or later and ADT 16 or later. The FAQ covers common lxml install errors on macOS.…
Highlights
- Removes resources reported as unused by Android Lint
- Works with Gradle projects through a lint results file
- Options for custom lint paths and existing results
- Option to ignore layout directories
- Installs with pip
Ratings & Reviews
No ratings yet
Be the first to rate Android Resource Remover.
People also visit
Universal Android Debloater Next Generation
Cross-platform GUI written in Rust using ADB to debloat non-rooted Android…
Android Resource Remover FAQ
What does it do?
It removes unused resources from an Android project, based on the Android Lint output, to reduce APK size.
How do I install it?
Run pip install android-resource-remover. The README lists Python 2.7 or later and ADT 16 or later as requirements.
How do I use it with Gradle?
Run lint through Gradle, then pass the lint results XML file to the remover with --xml.
Why run it more than once?
Resources can depend on each other, so a removal can leave new unused resources. The README says the authors ran it up to four times in a row.
What happens to my code?
Code that refers to a removed layout ID will fail to compile with an error that the ID cannot be found. The README says to clean up those references.
I get an lxml install error on macOS. What now?
The FAQ links fixes from Stack Overflow for the clang and libxml errors.
What are the best Android Resource Remover alternatives?
Popular alternatives to Android Resource Remover include Universal Android Debloater Next Generation, Droidlysis and Redex. See all Android Resource Remover alternatives



