Check if a "String resource" is being used in the project

3

Situation

When we do not use a variable in the file, Eclipse has a feature that is to inform the developer by issuing the following message:

  

The value of the field Class.ClientId is not used.

See the image below:

Similarly,isthereawaytotellifanitemisnotbeingusedintheres/values/stringsfileinEclipse?Suchastxt_button_enterasshownbelow:

<stringname="txt_button_enter">Enter</string>

In advance thank you.

    
asked by anonymous 08.09.2016 / 16:30

1 answer

5

To check in Eclipse, do the following:

  • Right click on the project name and select Package explorer
  • Select Android Tools
  • Select Run Lint: Check for Common Errors
  • Now when you open your strings.xml file, you will see everything that is not being used prominently.

        
    08.09.2016 / 19:27