Ron*_*tel 9 android android-studio
我在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
小智 22
我通过将播放服务降级为:
compile 'com.google.android.gms:play-services:6.1.71'
Run Code Online (Sandbox Code Playgroud)
在gradle文件中的依赖项.
它不可用,因为它已被弃用.请改用GoogleApiClient.
开始整合Google+:这是在您的Android应用中实施Google+客户端的官方文档,用于登录和其他要求.请遵循此而不是Android Studio中自动生成的代码(直到代码通过更新的实现进行更新).
PS另一个答案建议使用旧版本的PlusClient,这是一种错误的方法.您应该使用较新的代码而不是使用较旧的播放服务.
| 归档时间: |
|
| 查看次数: |
13404 次 |
| 最近记录: |