Extract all hardcoded strings to string resource

As your requirements and as I know there is no such feature in android studio you were really searching for, But here are some alternative ways that can help you.

  • Go to “Analyze > Run Inspection ..“, and type "Hardcoded strings". Run that in your whole project, and you will get an inspection results panel that will show all the hardcoded text of projects. Then hit Alt + Enter and you’ll get an option to automatically extract that Strings.

  • Another approach is to Find and Replace But It’s not better because of time consumption. To simplify the approach you can have a look at here for flexibility.

Leave a Comment