我更新并导入了google-play-services_lib项目并将此库添加到我的项目中仍然显示相同的错误导入com.google.android.gms.plus.PlusClient无法解决
import com.google.android.gms.plus.PlusClient;
并且无法将PlusClient解析为
上的类型private PlusClient mPlusClient;
答案 0 :(得分:1)
PlusClient在更新的播放服务中不可用。
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();
}