Google play services 连接到GoogleAppClient后未调用的GoogleAppClient.ConnectionCallbacks方法

Google play services 连接到GoogleAppClient后未调用的GoogleAppClient.ConnectionCallbacks方法,google-play-services,Google Play Services,我有一个问题: 但是已经添加了回调,但是仍然没有onConnection回调,也没有错误,为什么会这样?有人能帮忙吗 我的代码: 公共类MainActivity扩展活动实现GoogleAppClient.ConnectionCallbacks、GoogleAppClient.OnConnectionFailedListener{ 私人GoogleapClient MGoogleapClient @Override protected void onCreate(Bundle savedInst

我有一个问题:

但是已经添加了回调,但是仍然没有onConnection回调,也没有错误,为什么会这样?有人能帮忙吗

我的代码:

公共类MainActivity扩展活动实现GoogleAppClient.ConnectionCallbacks、GoogleAppClient.OnConnectionFailedListener{ 私人GoogleapClient MGoogleapClient

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    initGoogleApiClient();
}

private void initGoogleApiClient() {
       mGoogleApiClient = new GoogleApiClient.Builder( this )
       .addApi(Plus.API).addScope(Plus.SCOPE_PLUS_LOGIN)
       .addApi(Games.API).addScope(Games.SCOPE_GAMES)
       .addConnectionCallbacks(this)
       .addOnConnectionFailedListener(this)
       .build();

       mGoogleApiClient.connect();    
}
@Override
public void onConnected(Bundle bundle) {
}

@Override
public void onConnectionSuspended(int i) {
}

@Override
protected void onDestroy() {
    super.onDestroy();
    mGoogleApiClient.disconnect();
}

@Override
public void onConnectionFailed(com.google.android.gms.common.ConnectionResult connectionResult) {
}

我将再次回答我自己的问题。答案与使用调试键设置开发人员控制台有关:


没关系,我已经完成了!显然,你不能只从Eclipse调试你的应用程序,你必须用APK安装它,否则它将无法工作。如下所述:

祝所有浏览谷歌文档的人好运


:-S

好的,所以它仍然不起作用。有人能告诉我,在成就发挥作用之前,我必须“发布”它们吗?我正在开发人员控制台中注册登录,但由于应用程序未配置,我无法获得onConnection?!我正在使用的电子邮件帐户被设置为测试人员帐户。为什么现在无法工作?救命!