Is there any simple way to find out unused strings in Android project?

后端 未结 9 1171
傲寒
傲寒 2021-01-30 03:03

I have a huge Android project with many strings declared in strings.xml. I wanted to remove unused strings in strings.xml.

Is there any easy wa

9条回答
  •  臣服心动
    2021-01-30 03:34

    To check string.xml.

    It's easy (at least in my version of Eclipse)

    In Eclipse for Android (I have version v22.6.2-1085508)

    • Right click on the project name in "Package explorer"
    • Select "Android Tools".
    • Select "Run Lint: Check for common Errors".

    Now when you open strings.xml, you will see that unused string are highlighted.

    You can fix other potential issues.

提交回复
热议问题