Note: This seems to be an issue with the Android plugin. See comments for associated issues.
I get the following gradle error when building the project:
Credit to @Grsmto
As per this blog post you need to open a terminal and launch the following commands sequentially:
UPDATE
Now the workaround it's easier, you just need to go to Build -> Clean Project and then sync.
Windows
gradlew clean
gradlew assemble
Linux/Mac
./gradlew clean
./gradlew assemble
then sync the project.