我在设置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 gameClient = new GamesClient.Builder(getBaseContext(), this, this).create();
和
GamesClient gameClient = new GamesClient(getBaseContext(), this, this).create();
我不确定这是否是由于我在调用它的地方,或者与我如何调用它有关。任何帮助非常感谢!
干杯
答案 0 :(得分:0)
假设您已经实现了回调所需的方法,则必须执行此类GamesClient GamesClient gc = (new GamesClient.Builder(getBaseContext(), this, this)).create();
。