Initializing Games Client in Android

Solution 1:

I had the same problem initially. What I had to do was look at the full, unfiltered LogCat log. There, I saw the message:

GamesIntentService(17929): Using Google Play games services requires a metadata tag with the name "com.google.android.gms.games.APP_ID" in the application tag of your manifest

So, assuming you created an entry in your strings.xml called app_id, try adding the following to your AndroidManifest.xml under the <application> tag:

<meta-data android:name="com.google.android.gms.games.APP_ID"
        android:value="@string/app_id" />

You can find your APP_ID in the Games Services tab

**Games Services** tab

Solution 2:

Complementing Hetabiquo response, if you also use Cloud Save service in your game you also must to update your application's AndroidManifest.xml by adding the following meta-data tag inside <application> tag scope

<meta-data android:name="com.google.android.gms.appstate.APP_ID" android:value="@string/app_id" />

Solution 3:

Just had the same issue but had the meta-tag correct - I did look up the unfiltered logcat and found out, that it was searching for a different meta-tag.

The name of the meta-tag differs by the sort of Client Number you submitted in the GameHelper Constructor (if you use it).

new GameHelper(this, GameHelper.CLIENT_GAMES);

For me I accidentaly used CLIENT_ALL which leads to a wrong expectations of the meta-tag name. I changed it to CLIENT_GAMES and everything worked smoothly.