{"id":20844616,"url":"https://github.com/keepsafe/android-resource-remover","last_synced_at":"2025-05-15T14:08:19.144Z","repository":{"id":14108554,"uuid":"16813167","full_name":"KeepSafe/android-resource-remover","owner":"KeepSafe","description":"A simple utility to remove unused resources in your Android app to lower the size of the APK. It's based on the Android lint tool output.","archived":false,"fork":false,"pushed_at":"2022-07-06T19:50:41.000Z","size":103,"stargazers_count":1285,"open_issues_count":9,"forks_count":161,"subscribers_count":62,"default_branch":"master","last_synced_at":"2025-05-15T14:08:13.703Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KeepSafe.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-02-13T18:55:12.000Z","updated_at":"2025-04-26T05:41:03.000Z","dependencies_parsed_at":"2022-07-09T06:16:17.845Z","dependency_job_id":null,"html_url":"https://github.com/KeepSafe/android-resource-remover","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeepSafe%2Fandroid-resource-remover","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeepSafe%2Fandroid-resource-remover/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeepSafe%2Fandroid-resource-remover/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeepSafe%2Fandroid-resource-remover/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KeepSafe","download_url":"https://codeload.github.com/KeepSafe/android-resource-remover/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254355335,"owners_count":22057354,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-18T02:10:14.198Z","updated_at":"2025-05-15T14:08:14.133Z","avatar_url":"https://github.com/KeepSafe.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/KeepSafe/android-resource-remover.svg?branch=master)](https://travis-ci.org/KeepSafe/android-resource-remover)\n\n![resource-remover](https://keepsafe.github.io/i/proj/opensource_resource-remover.png)\nandroid-resource-remover\n========================\n\nandroid-resource-remover is utility that removes unused resources reported by [Android Lint](http://developer.android.com/tools/help/lint.html) from your project. The goal is to reduce your APK size and keep the app clean from unused stuff.\n\n\n## Getting started\nRequirements:\n\n* Python \u003e= 2.7.*\n* ADT \u003e= 16\n\nTo install run:\n\n    pip install android-resource-remover\n\n## Usage - general\nOpen the directory where your app is located and run\n\n```\nandroid-resource-remover\n```\n\nAndroid resources have dependencies to each other. This means that after running resource-remover the first time, it will clean up unused resources file that hold a reference to other resources. You can run this resource remover multiple times until there is no more unused resources to be removed. We've been running it up to 4 times in a row.\n\n\n### Use with gradle\n`android-resource-remover` is build on top of android lint. If you have a gradle project you have to run lint within your gradle build scripts and then use the `lint-result.xml` as the input file for `android-resource-remover`\n\ne.g.\n\n    ./gradlew clean build :lint \u0026\u0026 android-resource-remover --xml build/outputs/lint-results.xml\n\n\n### Options\n\n#### --help\nPrints help message.\n\n#### --lint\nFull path to the lint tool like: `d:\\Dev\\Android SDK\\tools\\lint`\n\nThis will be executed as the lint command. If not provided it assumes the lint command in available and runs: `lint`\n\n#### --app\nFull path to the android app like: `d:\\Dev\\My_Android_App`\n\nIf not provided it assumes the current directory is the app's root directory.\n\n#### --xml\n\nUse existing lint result. If provided lint won't be run.\n\n#### --ignore-layouts\n\nIgnore layout directory\n\n## Expected behavior\n### Resource ID in code not found\n\nIf you have references to elements in an old layout that you're not using anymore, you will get a compile error that the ID (`R.id.\u003csomething\u003e`) can not be found. The reason is that the resource file that contained `R.id.\u003csomething\u003e` has been removed as it was not used any more. Time to clean up your code.\n\n## FAQ\n\n**Q:  installing dependency lxml failed** with `clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]`  \n*A: [http://stackoverflow.com/a/22322645](http://stackoverflow.com/a/22322645)*\n\n**Q:  installing dependency lxml failed** with `fatal error: 'libxml/xmlversion.h' file not found`  \n*A: There are several ways to fix this listed on stackoverflow  [http://stackoverflow.com/questions/19548011/cannot-install-lxml-on-mac-os-x-10-9](http://stackoverflow.com/questions/19548011/cannot-install-lxml-on-mac-os-x-10-9)*\n\n## Issues and PR\n\nWhen opening an issue please include as much info as possible. pip.log, python varsion/info, os version/info might all be help us understanding what's the problem.\n\nIn PR please keep the formatting.\n\n## Licence\nApache version 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeepsafe%2Fandroid-resource-remover","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeepsafe%2Fandroid-resource-remover","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeepsafe%2Fandroid-resource-remover/lists"}