Android: java.lang.IllegalStateException: GoogleApiClient must be connected
I am integrating Google Plus into my android app, when I tried to log into Google Plus my app just crashed. It says -
java.lang.IllegalStateException: GoogleApiClient must be connected
Following is the number of lines that the stack points to,
if (Plus.AccountApi.getAccountName(mGoogleApiClient) != null)
@Override
public void onConnected(Bundle connectionHint) {
String personName = "Unknown";
if (Plus.AccountApi.getAccountName(mGoogleApiClient) != null) {
personName = Plus.AccountApi.getAccountName(mGoogleApiClient);
}
}
I took all the steps to integrate, added google services to my project and registered my app with the google API site.
+3
source to share
2 answers