-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem removing unused dimens and strings #16
Comments
i meet this problem |
this is not correct. the second argument in the message should be the name of the resource if it's empty it means the name wasn't picked up correctly. could you paste the file which causes the problem |
I apologize, github formatting problems. The second argument wasn't an empty string but the id of the unused dimen. Sorry for the confusion. It was like this: removing ('dimen', "<dimen_id_tag>") from resource ./res/values/dimens.xml |
i can't reproduce it. can you create a test for that in the sample app https://github.com/KeepSafe/android-resource-remover/blob/master/test/android_app/res/values/dimens.xml |
I'm having a related issue, but with different results: when trying to remove unused string resources, the entire contents of the xml file are deleted, causing the script to error (presumably from reading an EOF byte instead of a string). Here's the traceback: Namespace(app='.', ignore_layouts=False, lint='lint', xml='shareplan/build/outputs/lint-results.xml') |
@oneeyedhobbit Thanks for the report; can you please open a separate issue for this? It will help us keep track of what's still open and what is fixed. |
@benjamin-bader actually when I clone the repo and run the script directly everything seems to be working fine. It might just be that the version installed via pip is out of date. In light of that, would you still like me to open a new issue? |
Glad to hear that things are working again! I'd say it's up to you whether to open a new issue. If you find that there is a problem, please feel free to open one. |
Nope, everything is great running the script from the repo. You may want to remove the instructions to install via pip or (update the version you have uploaded there). Thanks for the awesome package =)! |
@oneeyedhobbit the pip version is indeed old and we will be updating it. thx for feedback |
pip updated |
When using the latest version of your script, the console output correctly prints out the message
removing ('dimen', "<dimen_name>") from resource ./res/values/dimens.xml
removing ('string', "<string_name>") from resource ./res/values/strings.xml
for all dimens and strings files but doesn't actually remove the said unused resource from the file. Is this a known issue?
The text was updated successfully, but these errors were encountered: