Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't resolve com.google.android.gms.plus.Plus class

I can't seem to resolve the Plus class from the Google Play services library. I've already imported the Google Play library into the project as an Android Library project through Eclipse. I'm also following the basic example from the getting started page.

My onCreate is currently this:

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mGoogleApiClient = new GoogleApiClient.Builder(getActivity())
    .addConnectionCallbacks(this)
    .addOnConnectionFailedListener(this)
    .addApi(Plus.API, null)
    .addScope(Plus.SCOPE_PLUS_LOGIN)
    .build();
}

Eclipse flags the Plus class names because it can't resolve them so the code doesn't build.

like image 449
midnightstar Avatar asked Feb 14 '14 22:02

midnightstar


2 Answers

Thank you NickT. I just updated Google Play Services and the Plus class came with the library.

like image 191
midnightstar Avatar answered Nov 10 '22 09:11

midnightstar


This might sort out the issue

mGoogleApiClient = new GoogleApiClient.Builder(this) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .addApi(Plus.API) .addScope(Plus.SCOPE_PLUS_LOGIN) .build();

like image 28
Manesh Appukuttan Avatar answered Nov 10 '22 11:11

Manesh Appukuttan