Principle:
Use lint scan out the project of useless, duplicate, version unreasonable resources, here we only deal with pictures, Layout,menu resources is corresponding lint
The results of the unusedresources, and then filter out the Unusedresources resources, the resources in accordance with the project directory backup (to prevent accidental deletion, convenient
recovery), and then delete. Deleted content, use object to save to OutData.txt, easy to consult.
I use Android Studio's lint plugin as an example (scan results have a clean and neat XML structure for easy data processing).
Steps:
1. Launch Android studio and run the target Android project using lint mode
Click Run
2. Automatically generate Lint-result.xml file, directory: Project Path \build\outputs\lint-result.xml
3. Configure Whitelist Whitelist.txt to filter out files that you do not need to delete
4. Click AutoCleaner.exe under File, select Lint-result.xml and select the resources you want to clean up.
5. Determine the cleanup, the cleaned files are backed up to the original path of the File\copyfile\ project, and the erased file information is in the form of an object
Save in OutResObj.txt
6. Complete the deleted files and follow the original directory backup
From for notes (Wiz)
Android Auto cleanup useless resource tool