I am developing an application in which i want sign in using google plus. I have follow the steps from https://developers.google.com/+/mobile/android/sign-in
But when i try to sign in to google plus using google api sample projects(imported from android sdk->extras->google services) it always show "Can't create reliable connection to server".
How can i solve it? i am testing the sample on real device.
My logcat is as follows,
05-17 15:21:56.500: E/GLSUser(6721): Empty consent data
05-17 15:21:56.500: I/GLSUser(6721): GLS error: NetworkError [email protected] oauth2:https://www.googleapis.com/auth/plus.login
05-17 15:21:56.500: W/GLSUser(6721): Status from wire: NetworkError status: NETWORK_ERROR
Sometimes the 2-step authentication process might be interfering with the sign in of your Google account or it might be the corrupted cache of your Google Account manager (and various other apps). Disabling the 2-Step verification process and clearing the cache of some apps have helped resolve the issue for quite a few users.
Fix: Google Play “Server Error” and “No Connection” 1 Method 2: Clearing Data and Cache of Google Play Store. ... 2 Method 3: Updating Date / Time settings. ... 3 Method 4: Changing Play Store language. ... 4 Method 5: Uninstalling Google Play Updates. ... 5 Method 7: Clear Google Services Framework Cache. ... More items...
If you’ve only registered the debug version of your app in the console, Google Social Login isn’t going to work in the release version of your app. So, make sure you register a debug version of your app in the Google Developer Console, and then create a second release version of your app in the Google Developer Console as well.
Fix: There Was A Problem Communicating With Google Servers 1 Method 1: Disable 2-Step Authentication and Clear Cache. ... 2 Method 2: Reinstall Google Play Services. ... 3 Method 3: Update Host Files (Only for Rooted Phones) Note: If you don’t know what a rooted phone is or if you aren’t sure whether your phone is rooted or ...
When following the code example at https://developers.google.com/+/mobile/android/sign-in, I got "Empty consent data" as well.
But calling setScopes() on the PlusClient instance seemed to solve the problem:
mPlusClient = new PlusClient.Builder(this, this, this)
.setVisibleActivities("http://schemas.google.com/AddActivity")
.setScopes(Scopes.PLUS_LOGIN, Scopes.PLUS_PROFILE)
.build();
Have you set scopes in your code example?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With