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