Igor Kronkdev
Igor Kronkdev

Reputation: 67

Error implementing google play services

Here is the code

    if (!BaseGameUtils.resolveConnectionFailure(this,
            mGoogleApiClient, connectionResult,
            RC_SIGN_IN, R.string.signin_other_error)) {
        mResolvingConnectionFailure = false;
    }

The error is wrong 5th argument type on R.string.signin.... It says required java.lang.String. How would i modify my code to get rid of the error. Thanks in advance.

Upvotes: 0

Views: 194

Answers (2)

Buzz
Buzz

Reputation: 516

This is what worked for me:

if (!BaseGameUtils.resolveConnectionFailure(this, mGoogleApiClient, connectionResult,
                RC_SIGN_IN, R.string.signin_other_error))

Upvotes: 0

Sharjeel
Sharjeel

Reputation: 15798

try

getResources().getString(R.string.signin_other_error);

getString takes resource id and returns String.

Upvotes: 1

Related Questions