To identify all unused resources:
- Open Menu > Analyze > Run Inspection by Name…
- Select “Unused Resources”
- Make sure Whole project is checked, then press OK.
- Look through the list. You can always rerun the Inspection with the Rerun button.
There is no really easy way in Android Studio (v 1.0) to remove a resource string for all locales. However, you can search and replace in files. Fortunately, the translation files use only a single line in most cases so this works pretty well.
In Android Studio:
- Start with no changes pending in your source control (makes it way easier to check and back out if this goes wrong).
- Open Menu > Edit > Find > Replace in Path…
- In Text to find:
.*name="obsoletestring".*\n
- In Replace with: (empty)
- Check Regular expression
- Press the Find button.
- Inspect the results. If okay, press the “All files” button.
- You will probably have to remove the comment in res/values/strings.xml manually.
- Make sure your project still builds.
- Take a look at the diff of your project in your source control to ensure the change is really what you intended…