简体   繁体   中英

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.

try

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

getString takes resource id and returns String .

This is what worked for me:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM