2013-08-18 43 views
2

我一直在爲我的Google Play遊戲服務設置GamesClient對象時遇到問題。Google遊戲服務GamesClient構造函數undefined,Android

所以我有我的主要活動,它擴展了BaseGameUtilities。 在onCreate()方法我嘗試建立GamesClient的我

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

在Eclipse中我得到的錯誤: 「構造GamesClient.Builder(上下文,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

你要做這樣的GamesClient的GamesClient gc = (new GamesClient.Builder(getBaseContext(), this, this)).create();假設你已經實現了回調的需要的方法。