The rebuild mentioned above may help, but I've had issues with gradle that persist.
Here is a good resource.
https://makmodo.com/android-resource-linking-failed/
But, in short, you may want to go through and open every XML file without scanning or running it. This will cause android to pinpoint any error occuring and you can at least start to narrow down where the error is coming from.
Then, you'll want to run a stacktrace, gradlew build --stacktrace
Another option, depending on when you run into the error is to start slowly backing up. Undo your last change, build, run ,etc.. and then get it to a point where it is running. This seems obvious, but often times it is the simple things that are overlooked.