Google游戏服务GamesClient构造函数未定义,Android

Google游戏服务GamesClient构造函数未定义,Android,android,service,constructor,Android,Service,Constructor,我在为我的Google Play游戏服务设置GamesClient对象时遇到问题 所以我有我的主要活动,它扩展了BaseGameUtilities。 在onCreate()方法中,我尝试设置GamesClient GamesClient.Builder gameClientBuilder = new GamesClient.Builder(getBaseContext(), this, this); 在Eclipse中,我得到一个错误:“构造函数GamesClient.Builder(Cont

我在为我的Google Play游戏服务设置GamesClient对象时遇到问题

所以我有我的主要活动,它扩展了BaseGameUtilities。 在onCreate()方法中,我尝试设置GamesClient

GamesClient.Builder gameClientBuilder = new GamesClient.Builder(getBaseContext(), this, this);
在Eclipse中,我得到一个错误:“构造函数GamesClient.Builder(Context,MainActivity,MainActivity)未定义”

我还尝试了以下电话,但没有成功:

 GamesClient.Builder gameClientBuilder = new GamesClient.Builder(this, this, this);

我不确定这是因为我在哪里叫这个,还是因为我怎么叫这个。非常感谢任何帮助


干杯

您必须像这样做GamesClient
GamesClient gc=(新建GamesClient.Builder(getBaseContext(),this,this)).create()假设您已经实现了回调所需的方法

GamesClient gameClient = new GamesClient.Builder(getBaseContext(), this, this).create();  
GamesClient gameClient = new GamesClient(getBaseContext(), this, this).create();