无法解析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.