AbAppletic AbAppletic - 1 year ago 749
Android Question

Cannot resolve symbol default_web_client_id in Firebase's Android Codelab

I am trying to learn Firebase, so I went through the Android Codelab. The project they gave me however, had an error:

Cannot resolve symbol default_web_client_id

And I didn't know how to solve it, since I didn't know the value of
or what it is. It is in the

protected void onCreate(Bundle savedInstanceState) {
mFirebaseAuth = FirebaseAuth.getInstance();

// Assign fields
mSignInButton = (SignInButton) findViewById(R.id.sign_in_button);

// Set click listeners

// Configure Google Sign In
GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
mGoogleApiClient = new GoogleApiClient.Builder(this)
.enableAutoManage(this /* FragmentActivity */, this /* OnConnectionFailedListener */)
.addApi(Auth.GOOGLE_SIGN_IN_API, gso)

I have no idea what it is, what's its value is, and why is it giving me this error. I haven't changed anything so far except for adding the
. I have added my SHA-1 and enabled Google in the console.

Answer Source

Sometimes there is issue while parsing google-services.json. I have reported this issue with to concerned team.

Meanwhile follow below step to fix this issue to get going further -

1) Open google-services.json file -> client -> oauth_client -> client_id

2) Copy this client ID and hardcode this .requestIdToken("your ID")

It would allow to request "IdToken" via GoogleSignInAccount post successful google login and to authorize your credential with firebase.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download