If the other good answers listed here aren't working for you, try opening Keychain Access and removing all 'iPhone Developer...' certificates other than the primary one you're using for code signing. I found that I had several revoked certificates, and certificates from my other teammates that needed to be deleted.
In my case it was Game Center entitlement. It was displayed on the portal as checked (checked by default) but actually this entitlement was not included in mobile provisioning file. So it was matter of deleting it from Entitlements file.
The error message from xcode app installation sometime can be very misleading, I have aligned the entitlements many times, but the root cause is not because of that, it is because I have changed the certificate and my build pipeline script was using wrong certificate SHA value: