Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

name="string" is translated here but not found in the default locale

Tags:

android

xml

I am declaring a string in the strings.xml and I am getting this error

here is my code:

<string name="date_picker_title">Hire Date</string>
<string name="new_employee">New Employee</string>
<string name="show_subtitle">Show Subtitle</string>
<string name="hide_subtitle">Hide Subtitle</string>
<string name="subtitle_format">%1$s crimes</string>
<string name="choose_menu">Choose a Menu Option</string>

enter image description here

like image 636
ZIA ANSARI Avatar asked Apr 05 '18 10:04

ZIA ANSARI


2 Answers

Here in my case this just helped me:

  1. Select the strings that are causing error.
  2. Cut them.
  3. Paste them again!

If it doesn't work for you, try adding the same strings to strings.xml(v21) file.
This worked perfectly for me.

like image 149
Gourav Avatar answered Sep 27 '22 17:09

Gourav


Try this. It solved the error in my case.

Go to File -> Invalidate caches and restart . In Android Studio Menu Bar

like image 45
ArpitA Avatar answered Sep 27 '22 16:09

ArpitA