Google Plus Android API:“未定义 PlusClient.Builder 类型的 setActions(String[]) 方法"; [英] Google Plus Android API: "The method setActions(String[]) is undefined for the type PlusClient.Builder"

查看:35
本文介绍了Google Plus Android API:“未定义 PlusClient.Builder 类型的 setActions(String[]) 方法";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使示例 Android Google+ 应用程序正常工作...(Google 在此处提供示例应用程序:https://developers.google.com/+/quickstart/android )

I am trying to make the sample Android Google+ app working... (sample app provided by Google here: https://developers.google.com/+/quickstart/android )

我在setAction"方法上遇到编译错误:

I am getting a compiling error on the "setAction" methods:

mPlusClient = new PlusClient.Builder(this, this, this)
                .setActions(MomentUtil.ACTIONS) // Compiling error here !
                .build();

我得到未定义 PlusClient.Builder 类型的 setActions(String[]) 方法"

I get "The method setActions(String[]) is undefined for the type PlusClient.Builder"

有人知道我为什么会收到这个错误吗???

Anybody knows why I get this error ???

谢谢!!

推荐答案

1) 转到 SDK Manager 并转到 extras 并选择 google play services 并安装最新更新.

1) Go to SDK Manager and go to extras and select google play services and install latest update.

2) 然后浏览您的 sdk 文件夹,如 sdk/extras/google/.. 您将找到库项目.将该项目导入工作区并将其作为库添加到您的项目中.

2) Then browse through your sdk folder like sdk/extras/google/.. You will find the library project.Import that project into workspace and add it as library to ur project.

3) 然后清理构建并运行.

3) Then clean build and run.

这篇关于Google Plus Android API:“未定义 PlusClient.Builder 类型的 setActions(String[]) 方法";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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