问题描述:

I have imported BaseGameUtil library.

But I can't able to import com.google.android.gms.common.api.GoogleApiClient

Even I have added google-play-services-lib in this library.

I had set Google APis 4.1.2 as a project target.

网友答案:

You dont need to import this. Just Import

import com.google.example.games.basegameutils.GameHelper;

then create

GameHelper gameHelper;

setup it like this

if (gameHelper == null) {
    gameHelper = new GameHelper(this, GameHelper.CLIENT_GAMES);
    gameHelper.enableDebugLog(true);
}

gameHelper.setup(this);

and get GoogleApiClient this way

gameHelper.getApiClient()
相关阅读:
Top