Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"is translated here but not found in default locale" error in strings.xml with translatable="false"

this happened to me too

I do 2 things:

  • Verify entire file to see another translate not done ( I have ones in file en but in pt-br)
  • Clean, update gradle and quit and restart the Android Studio

Rebuilding can take a long time. YMMV, but...

Simply remove the offending line and re-add it.

Worked for me. Very fast.


In my case this helped me:

  1. Select the strings that cause 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.


Press Invalidate Caches / Restart ... to restart android studio. It worked for me. Actually this happened when I had copied files from my other computer and pasted via file explorer.


I had the same error message, just with the weird issue that it was thrown in the default locale itself and all translations. Turns out you should not use dots in your name (e.g. name="bla.blub") because it will be internally converted to "bla_blub" and then it cannot match with "bla.blub", hence the error. I only had to change the dots to underlines in the default locale and then all other errors in other translations (including dots in the name) were gone as well.

But be aware that other build tools can still create issues, so replace all the dots with underlines instead!


Quitting Android Studio and restarting it fixed it for me.