Android无法解析导入com.google.android.gms.plus.PlusClient

时间:2015-07-27 13:03:20

标签: android google-plus google-play-services

我更新并导入了google-play-services_lib项目并将此库添加到我的项目中仍然显示相同的错误导入com.google.android.gms.plus.PlusClient无法解决

import com.google.android.gms.plus.PlusClient; 

并且无法将PlusClient解析为

上的类型
private PlusClient mPlusClient;

1 个答案:

答案 0 :(得分:1)

PlusClient在更新的播放服务中不可用。

来自this link

  private GoogleApiClient buildGoogleApiClient() {
    // When we build the GoogleApiClient we specify where connected and
    // connection failed callbacks should be returned, which Google APIs our
    // app uses and which OAuth 2.0 scopes our app requests.
    return new     GoogleApiClient.Builder(SigninActivity.this).addConnectionCallbacks(this)
            .addOnConnectionFailedListener(this).addApi(Plus.API,   Plus.PlusOptions.builder().build())
            .addScope(Plus.SCOPE_PLUS_LOGIN).build();
}