One possibility is an issue with your client configuration file. Make sure you followed Step 2: get a configuration file in the App Invites guide and have added the the google-services.json file to your project.
Check that package_name and certificate_hash match your credentials in Developers Console for the Default Demo App. Note: the certificate_hash will not have the colon delimiters.
// from: google-services.json
...
"oauth_client": [
{
"client_id": "<id>",
"client_type": 1,
"android_info": {
"package_name": "com.google.android.gms.samples.appinvite",
"certificate_hash": "<Signing-certificate fingerprint>"
}
}
],