2

I've been following this guide on Google Developers and have stumbled into some errors. https://developers.google.com/identity/sign-in/android/sign-in

Here is the code I'm having problems with:

public void onConnectionFailed(ConnectionResult connectionResult) { Log.d("", "onConnectionFailed:" + connectionResult); if (!mIsResolving && mShouldResolve) { if (connectionResult.hasResolution()) { try { connectionResult.startResolutionForResult(this, RC_SIGN_IN); mIsResolving = true; } catch (IntentSender.SendIntentException e) { Log.e("", "Could not resolve ConnectionResult.", e); mIsResolving = false; mGoogleApiClient.connect(); } } else { // Could not resolve the connection result, show the user an // error dialog. showErrorDialog(connectionResult); } } else { // Show the signed-out UI showSignedOutUI(); } } 

and the errors:

Error:(133, 17) error: cannot find symbol method showErrorDialog(ConnectionResult)

Error:(137, 13) error: cannot find symbol method showSignedOutUI()

I apologize in advance if this is a newbie question, is it because I've forgotten to import something? I've tried importing many other different components but it did not solve the issue.

import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.plus.*; import com.google.android.gms.common.api.Scope; import com.google.android.gms.common.Scopes; import com.google.android.gms.common.api.GoogleApiClient; 

I'm a lost sheep here, any help i would greatly appreciate!

2
  • What does your class declaration look like? Commented Aug 7, 2015 at 8:46
  • public class MainActivity extends ActionBarActivity implements GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener, View.OnClickListener { sorry if it looks messy! is this what you're looking for? >< @JonK Commented Aug 7, 2015 at 10:59

3 Answers 3

1

Try to declare it as private static final int RC_SIGN_IN = 0;

Sign up to request clarification or add additional context in comments.

Comments

0

Apparently I have to get these methods from google's github over here -> https://github.com/googlesamples/google-services/tree/master/android/signin and define them myself.

Comments

0

First of all, please do not post additional information as answer to your question.

Secondary, cannot resolve symbol method is always means that method or field doesn't exist in your class or package.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.