I had this problem for a while, and I tried all the "provided solutions";
- Sync Gradle Files.
- Invalid cache.
- Deleted and re-added project.
- Reinstall Android Studio.
Nothing helped until I came across this answer (4gus71n), which worked for me every time this rather rare but annoying question presented itself: fooobar.com/questions/2039152 / ...
In my case, I;
- Closed Android Studio.
- Cleared the contents of
C:\Users\MyUsername\.AndroidStudio3.2\system\caches\ . - Restarted Android Studio.
The treat worked!
source share