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

前端 未结 3 660
陌清茗
陌清茗 2021-01-12 19:21

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

here is my code:

Hire Da         


        
相关标签:
3条回答
  • 2021-01-12 19:26

    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.

    0 讨论(0)
  • 2021-01-12 19:38

    Try this. It solved the error in my case.

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

    0 讨论(0)
  • 2021-01-12 19:47

    Besides all the answers here, make sure your default strings.xml doesn't have a tools:locale attribute. Apparently, the default locale is assumed to be English always.

    0 讨论(0)
提交回复
热议问题