After adding new items in strings.xml
, quite often they don't start working immediately in Android Studio's Preview.
Couldn't resolve resource @string/faq_customer_service
Preview looks like this:
I've obviously tried to re-build the project, and even run gradle clean assembleDebug
, but it doesn't seem to help. On emulator & real device the newly-added string resources do work.
Any trick to force Android Studio to reload the resources so that the correct texts show up in Preview?
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!
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With