I used the google TypeANumber demo from developer.android.com/training. I correctly configured the application in the developer console play.google.com, even published it, correctly configured the TypeANumber game service in the developer console and linked the previous application, even published this service, and I still continue to receive resultCode 10004 which means
public static final int RESULT_APP_MISCONFIGURED Result code sent back to the defiant activity when the game is improperly configured to access the Games service. Developers should check the logs for more details. Constant Value: 10004 (0x00002714)
Used code:
package com.sitewalk.typeanumber; import android.accounts.AccountManager; import android.app.Activity; import android.app.Dialog; import android.app.DialogFragment; import android.content.DialogInterface; import android.content.DialogInterface.OnCancelListener; import android.content.Intent; import android.content.IntentSender.SendIntentException; import android.os.Bundle; import android.util.Log; import com.google.android.gms.auth.GoogleAuthUtil; import com.google.android.gms.common.AccountPicker; import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.GooglePlayServicesUtil; import com.google.android.gms.common.api.GoogleApiClient; import com.google.android.gms.games.Games; public class GooglePlayServicesActivity extends Activity implements GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener { private static final String TAG = "GooglePlayServicesActivity"; private static final String KEY_IN_RESOLUTION = "is_in_resolution"; private static final String DIALOG_ERROR = "dialog_error"; private static final int REQUEST_RESOLVE_ERROR = 1001; private GoogleApiClient mGoogleApiClient; private boolean mIsInResolution; private boolean mResolvingError=false; private static final String STATE_RESOLVING_ERROR = "resolving_error"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (mGoogleApiClient == null) { mGoogleApiClient = new GoogleApiClient.Builder(this) .addApi(Games.API) .addScope(Games.SCOPE_GAMES)
as well as the correct AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.sitewalk.typeanumber" > <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name=".GooglePlayServicesActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /> <meta-data android:name="com.google.android.gms.games.APP_ID" android:value="@string/app_id" /> </application> </manifest>
with the correct APP-ID (check digit after the digit), and build.gradle, containing the dependencies on the game services:
apply plugin: 'com.android.application' android { compileSdkVersion 21 buildToolsVersion "20.0.0" defaultConfig { applicationId "com.sitewalk.typeanumber" minSdkVersion 14 targetSdkVersion 21 versionCode 2 versionName "1.1" } buildTypes { release { runProguard false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.google.android.gms:play-services:6.5.87' }
Logcat doesn't tell me any details about 10004 codeResult:
01-28 11:10:54.735 31182-31182/com.sitewalk.typeanumber D/dalvikvm﹕ Late-enabling CheckJNI 01-28 11:10:54.755 31182-31188/com.sitewalk.typeanumber D/dalvikvm﹕ Debugger has detached; object registry had 1 entries 01-28 11:10:55.055 31182-31182/com.sitewalk.typeanumber I/System.out﹕ Sending WAIT chunk 01-28 11:10:55.055 31182-31182/com.sitewalk.typeanumber W/ActivityThread﹕ Application com.sitewalk.typeanumber is waiting for the debugger on port 8100... 01-28 11:10:55.775 31182-31188/com.sitewalk.typeanumber I/dalvikvm﹕ Debugger is active 01-28 11:10:55.865 31182-31182/com.sitewalk.typeanumber I/System.out﹕ Debugger has connected 01-28 11:10:55.865 31182-31182/com.sitewalk.typeanumber I/System.out﹕ waiting for debugger to settle... 01-28 11:10:56.075 31182-31182/com.sitewalk.typeanumber I/System.out﹕ waiting for debugger to settle... 01-28 11:10:56.275 31182-31182/com.sitewalk.typeanumber I/System.out﹕ waiting for debugger to settle... 01-28 11:10:56.475 31182-31182/com.sitewalk.typeanumber I/System.out﹕ waiting for debugger to settle... 01-28 11:10:56.675 31182-31182/com.sitewalk.typeanumber I/System.out﹕ waiting for debugger to settle... 01-28 11:10:56.875 31182-31182/com.sitewalk.typeanumber I/System.out﹕ waiting for debugger to settle... 01-28 11:10:57.075 31182-31182/com.sitewalk.typeanumber I/System.out﹕ waiting for debugger to settle... 01-28 11:10:57.275 31182-31182/com.sitewalk.typeanumber I/System.out﹕ waiting for debugger to settle... 01-28 11:10:57.475 31182-31182/com.sitewalk.typeanumber I/System.out﹕ debugger has settled (1340) 01-28 11:10:57.755 31182-31182/com.sitewalk.typeanumber W/PopupManager﹕ You have not specified a View to use as content view for popups. Falling back to the Activity content view which may not work properly in future versions of the API. Use setViewForPopups() to set your content view. 01-28 11:10:57.835 31182-31182/com.sitewalk.typeanumber I/Adreno-EGL﹕ <qeglDrvAPI_eglInitialize:410>: EGL 1.4 QUALCOMM build: () OpenGL ES Shader Compiler Version: E031.24.00.07 Build Date: 04/07/14 Mon Local Branch: au011 Remote Branch: Local Patches: Reconstruct Branch: 01-28 11:10:57.865 31182-31182/com.sitewalk.typeanumber D/OpenGLRenderer﹕ Enabling debug mode 0 01-28 11:11:01.435 31182-31182/com.sitewalk.typeanumber I/Choreographer﹕ Skipped 211 frames! The application may be doing too much work on its main thread. 01-28 11:11:01.665 31182-31182/com.sitewalk.typeanumber I/ActivityManager﹕ Timeline: Activity_idle id: android.os.BinderProxy@42e3b748 time:437201118 01-28 11:11:10.835 31182-31182/com.sitewalk.typeanumber I/ActivityManager﹕ Timeline: Activity_idle id: android.os.BinderProxy@42e3b748 time:437210285
Only one event log that I have:
11:10:34 Gradle build finished in 5 sec
Anyone see my mistake?