我在android中使用loginActivity.
错误
can not find symbol class Builder
Run Code Online (Sandbox Code Playgroud)
我还导入了文件: com.google.android.gms.plus.PlusClient
这行出错了
mPlusClient = new PlusClient.Builder(this, this, this).setScopes(Scopes.PLUS_LOGIN, Scopes.PLUS_ME).build();
Run Code Online (Sandbox Code Playgroud)
这是来自模板的自动生成的文件.这个错误的原因是什么?
编辑
我正在使用android studio
minSdkVersion 11
targetSdkVersion 21
我最近下载了Android Studio,我认为它有更多功能eclipse.
我创建了一个具有登录活动的新项目,但似乎活动出现错误:![在此处输入图像描述] [1]
**Error:(78, 31) error: cannot find symbol class Builder
Error:Execution failed for task ':app:compileDebugJava'.
> Compilation failed; see the compiler error output for details.**
Run Code Online (Sandbox Code Playgroud)
import com.google.android.gms.plus.PlusClient;
// This is the helper object that connects to Google Play Services.
private PlusClient mPlusClient;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Initialize the PlusClient connection.
// Scopes indicate the information about the user your application will be able to access.
mPlusClient =
new PlusClient.Builder(this, this, …Run Code Online (Sandbox Code Playgroud)