“Couldn't resolve resource” in Android Studio's Preview

前端 未结 7 1567
無奈伤痛
無奈伤痛 2021-01-31 01:41

After adding new items in strings.xml, quite often they don\'t start working immediately in Android Studio\'s Preview.

Couldn\'t resolve res

相关标签:
7条回答
  • 2021-01-31 02:08

    Render Problem:

    `Couldn't resolve resource @string/hello_blank_fragment`
    

    Just refresh the Layout.

    work for me..

    0 讨论(0)
  • 2021-01-31 02:09

    you DO NOT need to close the entire project. It's just way too much for so little problem.

    Just refresh the preview (click the "refresh" button)

    provided from https://stackoverflow.com/a/34754707/3339597

    0 讨论(0)
  • 2021-01-31 02:17

    There are three steps for solving this problem

    1. Build -->Clean Project

    2. Build -->Rebuild Project

    3. Restart android studio

    0 讨论(0)
  • 2021-01-31 02:18

    Couldn't resolve resource @string/faq_customer_service or Couldn't resolve resource @id/visible or Couldn't resolve resource @id/masked The solution is if you implement TextInputLayout the above problems may arise ... so Simply add those id or strings to xml files as their property.

    0 讨论(0)
  • 2021-01-31 02:19

    The only reliable way I've found so far is reloading the project / restarting Android Studio.

    Quickest way to do that is File → Invalidate caches / Restart... → Just Restart.

    Feel free to post better solutions!

    0 讨论(0)
  • 2021-01-31 02:25

    Right click on project and Synchronize '...Project' worked for me.

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