Just a nagging issue sometimes experienced in Android studio, when you can seem to build the app and all seems okay but build fails on "Configure Build" right after "Configure Settings". Restarting the IDE didn't fix it for me. Here was what fixed it in my case.
For this fix, you need not go through the stress of invalidating cache and restart, the simple fix was, closing all the projects presently opened in the IDE (go to File -> Close Project), Do this for all the open instances of Android Studio till you're left with the "Welcome screen". Open and reopening your project from the welcome screen and all works again, happened several times this week, this was the only weird set of activity that fixed it quickly in my case.
|Android Studio, Welcome Screen.|