ConnectionResult.getErrorCode() = 4

2019-06-09 06:24发布

问题:

Here I am doing Google+ integartion. I am using the following code but I am facing the error which is : onConnectionFailed: ConnectionResult.getErrorCode() = 4. So please anybody help me and tell me what I am doing wrong in this code and provide me the solution for this. I will be very thankful to you. I searched a lot but found nothing. I am using the quick sample of Google plus.

回答1:

According to https://developers.google.com/+/quickstart/android you get error code = 4, if you have not configured consent screen correctly.

If you are seeing ConnectionResult.getErrorCode() = 4 when trying to connect, ensure that the consent screen is configured and saved.


回答2:

Actually I got the same error, but the consent screen was good for me, my real problem was a mistake with the package name when I was trying to create a new Client ID, I put the correct one, and now I can work prefectly. Even though google says:Troubleshooting