Unable to build PlusClient

后端 未结 4 913
    import com.google.android.gms.common.ConnectionResult;
    import com.google.android.gms.common.GooglePlayServicesClient.ConnectionCallbacks;
    import com.goog         


        
4条回答
  •  天涯浪人
    2021-01-04 11:47

    If anybody still has this problem: the PlayClient is deprecated now. The "new" way to go is described here: http://android-developers.blogspot.com/2014/02/new-client-api-model-in-google-play.html

    mClient = new GoogleApiClient.Builder(this)
            .addApi(Drive.API)
            .addScope(Drive.SCOPE_FILE)
            .addApi(Plus.API, plusOptions)
            .addScope(Plus.SCOPE_PLUS_LOGIN)
            .addConnectionCallbacks(this)
            .addOnConnectionFailedListener(this)
            .build();
    

提交回复
热议问题