Android Studio 3.6.1 won't recognize newly created resources

Viewed 100

I updated to Android Studio 3.6.1 (from 3.5.x) recently. Ever since then, when I create a new xml layout resource, Android Studio won't autocomplete the name, and it will appear like a compilation error, even though the app builds just fine. This persists until you restart Android Studio.

enter image description here

The app will still build and run just fine, but even after building and running it still shows as a compilation error, I cannot CMD+Click in to the file, and still can't autocomplete the name of the file.

Things I've tried:

Clean (doesn't work)
Rebuild (doesn't work)
Make Project (doesn't work)
Make Module (doesn't work)

File -> Invalidate Caches/Restart (WORKS!)

Obviously I can't restart Android Studio every time I add a new layout resource file. Does anyone know why this is happening, or a way I can fix it?

0 Answers
Related