无法解析com.google.android.gms.plus.Plus类 [英] Can't resolve com.google.android.gms.plus.Plus class

查看:203
本文介绍了无法解析com.google.android.gms.plus.Plus类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎无法从Google Play服务库解析Plus类。我已经通过Eclipse将Google Play库导入到Android Library项目中。我也在入门页面中遵循基本的示例

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.

我的onCreate目前是这样的:

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标记了Plus类名,因为它不能解析它们,因此代码不构建。

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

推荐答案

谢谢 NickT 。我刚刚更新了Google Play服务,而加班课程则附带了图书馆。

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

这篇关于无法解析com.google.android.gms.plus.Plus类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆