RESOLVED.
In a nutshell, this frustrating problem was caused by the following:
-
gameNetwork.init at launch automatically outputs “Google Play services resources not found” error on terminal (even when there are no such error). This error must be ignored and not to be dealt with.
-
gameNetwork.init returns event.isError only. Unlike iOS version, it does not return event.data – so not calling login request until event.data is returned resulted in gameNetwork.init to do nothing.
In hindsight, I probably would not have spent so many days sorting this out if I knew “resources not found” error should’ve been simply ignored. I was chasing after a false trail the entire time, fiddling and fiddling and fiddling forever with Google Play Dev Console… If only I looked for the problem elsewhere sooner…
Thank you, Christopher and Rob, for being there for me.
Naomi
Original Post
I’m using latest public release (2014.2381), and testing on Nexus 7 (with Android 4.3 Jelly Bean).
I’m working on adding Leaderboard and Achievement along with in-app billing to my latest game app, but I’m unable to get the gameNetwork.init to do anything.
I believe I set up my build.settings and config.lua correctly. I also believe I added my game to Google Developer Console properly (including Game Services, linking to the game, authorizing the linked game, adding test users, etc.)
However, gameNetwork.init just doesn’t do anything.
I mean, I call gameNetwork.init( “google”, initCallback ) in main.lua, and it fails with event.isError. The logcat says “onConnectionFailed: since user didn’t initiate sign-in, failing now.”
I then go on to my game’s GPGS sign-in screen, and tap on “Sign In”, which calls gameNetwork.init( “google”, initCallback ) again. Then my app waits for initCallback for a response, but none comes. It doesn’t even respond with event.isError – it simply waits and waits (and the device falls asleep.)
I can ignore this waiting part – meaning, without waiting for the response, I can exit the GPGS sign-in screen and start playing my game without any problems. So when I call gameNetwork.init in GPGS sign-in screen, it’s as if it doesn’t do anything.
Looking at logcat, I see there are some problems (I’ve posted the relevant log and full log below).
Any ideas on how to deal with this problem? I’d so appreciate any and all help.
Naomi
--------- RELEVANT ERROR LOG ----------
D/dalvikvm( 6161): No JNI_OnLoad found in /data/app-lib/com.mycompany.myapp-1/liblua.so 0x41c59b60, skipping init
D/dalvikvm( 6161): No JNI_OnLoad found in /data/app-lib/com.mycompany.myapp-1/libmpg123.so 0x41c59b60, skipping init
D/dalvikvm( 6161): No JNI_OnLoad found in /data/app-lib/com.mycompany.myapp-1/libalmixer.so 0x41c59b60, skipping init
D/BaseGameActivity( 6161): onCreate: creating GamesClient
E/GooglePlayServicesUtil( 6161): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
D/BaseGameActivity( 6161): onConnectionFailed: result 4
D/BaseGameActivity( 6161): onConnectionFailed: since user didn’t initiate sign-in, failing now.
I/Corona ( 6161): -------------- Google Play Game Services initCallback failed -------------
I/Corona ( 6161): event.isError = true
-------- FULL LOG --------
I/ActivityManager( 443): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.mycompany.myapp/com.ansca.corona.CoronaActivity} from pid 722
D/dalvikvm( 443): GC_FOR_ALLOC freed 957K, 24% free 15322K/19928K, paused 54ms, total 56ms
I/ActivityManager( 443): Start proc com.mycompany.myapp for activity com.mycompany.myapp/com.ansca.corona.CoronaActivity: pid=6161 uid=10072 gids={50072, 3003, 1015, 1028}
I/ActivityThread( 6161): Pub com.mycompany.myapp.files: com.ansca.corona.storage.FileContentProvider
D/dalvikvm( 6161): Trying to load lib /data/app-lib/com.mycompany.myapp-1/liblua.so 0x41c59b60
D/dalvikvm( 6161): Added shared lib /data/app-lib/com.mycompany.myapp-1/liblua.so 0x41c59b60
D/dalvikvm( 6161): No JNI_OnLoad found in /data/app-lib/com.mycompany.myapp-1/liblua.so 0x41c59b60, skipping init
D/dalvikvm( 6161): Trying to load lib /data/app-lib/com.mycompany.myapp-1/libjnlua5.1.so 0x41c59b60
D/dalvikvm( 6161): Added shared lib /data/app-lib/com.mycompany.myapp-1/libjnlua5.1.so 0x41c59b60
D/dalvikvm( 6161): Trying to load lib /data/app-lib/com.mycompany.myapp-1/libjnlua5.1.so 0x41c59b60
D/dalvikvm( 6161): Shared lib ‘/data/app-lib/com.mycompany.myapp-1/libjnlua5.1.so’ already loaded in same CL 0x41c59b60
I/dalvikvm( 6161): threadid=1: recursive native library load attempt (/data/app-lib/com.mycompany.myapp-1/libjnlua5.1.so)
D/dalvikvm( 6161): Trying to load lib /data/app-lib/com.mycompany.myapp-1/libopenal.so 0x41c59b60
I/OpenAL_SLES( 6161): alc_opensles_init
D/dalvikvm( 6161): Added shared lib /data/app-lib/com.mycompany.myapp-1/libopenal.so 0x41c59b60
D/dalvikvm( 6161): Trying to load lib /data/app-lib/com.mycompany.myapp-1/libmpg123.so 0x41c59b60
D/dalvikvm( 6161): Added shared lib /data/app-lib/com.mycompany.myapp-1/libmpg123.so 0x41c59b60
D/dalvikvm( 6161): No JNI_OnLoad found in /data/app-lib/com.mycompany.myapp-1/libmpg123.so 0x41c59b60, skipping init
D/dalvikvm( 6161): Trying to load lib /data/app-lib/com.mycompany.myapp-1/libalmixer.so 0x41c59b60
D/dalvikvm( 6161): Added shared lib /data/app-lib/com.mycompany.myapp-1/libalmixer.so 0x41c59b60
D/dalvikvm( 6161): No JNI_OnLoad found in /data/app-lib/com.mycompany.myapp-1/libalmixer.so 0x41c59b60, skipping init
D/dalvikvm( 6161): Trying to load lib /data/app-lib/com.mycompany.myapp-1/libcorona.so 0x41c59b60
D/dalvikvm( 6161): Added shared lib /data/app-lib/com.mycompany.myapp-1/libcorona.so 0x41c59b60
D/dalvikvm( 6161): GC_CONCURRENT freed 158K, 4% free 7608K/7920K, paused 6ms+12ms, total 71ms
D/dalvikvm( 6161): GC_CONCURRENT freed 91K, 3% free 8015K/8260K, paused 11ms+17ms, total 75ms
D/libEGL ( 6161): loaded /system/lib/egl/libEGL_tegra.so
D/libEGL ( 6161): loaded /system/lib/egl/libGLESv1_CM_tegra.so
D/libEGL ( 6161): loaded /system/lib/egl/libGLESv2_tegra.so
D/OpenGLRenderer( 6161): Enabling debug mode 0
D/dalvikvm( 6161): Note: class Landroid/opengl/GLWrapperBase; has 250 unimplemented (abstract) methods
V/GLSurfaceView( 6161): glGetString(7937) returns NVIDIA Tegra 3;
V/Corona ( 6161): > Class.forName: network.LuaLoader
V/Corona ( 6161): < Class.forName: network.LuaLoader
V/Corona ( 6161): Loading via reflection: network.LuaLoader
I/Corona ( 6161): Platform: Nexus 7 / ARM Neon / 4.2 / NVIDIA Tegra 3 / OpenGL ES 2.0 14.01002 / 2014.2381
I/ActivityManager( 443): Displayed com.mycompany.myapp/com.ansca.corona.CoronaActivity: +660ms
V/Corona ( 6161): > Class.forName: CoronaProvider.licensing.google.LuaLoader
V/Corona ( 6161): < Class.forName: CoronaProvider.licensing.google.LuaLoader
V/Corona ( 6161): Loading via reflection: CoronaProvider.licensing.google.LuaLoader
D/dalvikvm( 6161): GC_FOR_ALLOC freed 370K, 7% free 7945K/8468K, paused 30ms, total 31ms
I/dalvikvm-heap( 6161): Grow heap (frag case) to 11.811MB for 4096016-byte allocation
D/dalvikvm( 6161): GC_FOR_ALLOC freed <1K, 5% free 11944K/12472K, paused 39ms, total 39ms
D/dalvikvm( 6161): GC_CONCURRENT freed 4K, 5% free 11944K/12472K, paused 2ms+2ms, total 71ms
I/SoundDecoder( 6161): ALL MPG123 DECODERS:
I/SoundDecoder( 6161): generic
I/SoundDecoder( 6161):
I/SoundDecoder( 6161): SUPPORTED MPG123 DECODERS:
I/SoundDecoder( 6161): generic
I/SoundDecoder( 6161):
I/OpenAL_SLES( 6161): opensles_open_playback pDevice=0x674a8008, deviceName=(null)
I/OpenAL_SLES( 6161): alc_opensles_probe DEVICE_PROBE
I/OpenAL_SLES( 6161): opensles_reset_playback pDevice=0x674a8008
I/OpenAL_SLES( 6161): bits=16, channels=2, samples=1024, size=4096, freq=44100
I/OpenAL_SLES( 6161): create audio player
W/libc ( 6161): pthread_create sched_setscheduler call failed: Operation not permitted
I/OpenAL_SLES( 6161): playback_function started
I/OpenAL ( 6161): _SC_NPROCESSORS_ONLN=4
I/SoundDecoder( 6161): OGG: bitstream version == (0).
I/SoundDecoder( 6161): OGG: bitstream channels == (1).
I/SoundDecoder( 6161): OGG: bitstream sampling rate == (44100).
I/SoundDecoder( 6161): OGG: seekable == {TRUE}.
I/SoundDecoder( 6161): OGG: number of logical bitstreams == (1).
I/SoundDecoder( 6161): OGG: serial number == (951740170).
I/SoundDecoder( 6161): OGG: total seconds of sample == (0.000000).
V/Corona ( 6161): > Class.forName: CoronaProvider.gameNetwork.google.LuaLoader
V/Corona ( 6161): < Class.forName: CoronaProvider.gameNetwork.google.LuaLoader
V/Corona ( 6161): Loading via reflection: CoronaProvider.gameNetwork.google.LuaLoader
V/Corona ( 6161): > Class.forName: CoronaProvider.ads.vungle.LuaLoader
V/Corona ( 6161): < Class.forName: CoronaProvider.ads.vungle.LuaLoader
V/Corona ( 6161): Loading via reflection: CoronaProvider.ads.vungle.LuaLoader
W/dalvikvm( 6161): VFY: unable to resolve static field 5063 (common_google_play_services_install_title) in Lcom/google/android/gms/R$string;
D/dalvikvm( 6161): VFY: replacing opcode 0x60 at 0x004b
W/dalvikvm( 6161): VFY: unable to resolve static field 5059 (common_google_play_services_enable_title) in Lcom/google/android/gms/R$string;
D/dalvikvm( 6161): VFY: replacing opcode 0x60 at 0x0056
W/dalvikvm( 6161): VFY: unable to resolve static field 5074 (common_google_play_services_update_title) in Lcom/google/android/gms/R$string;
D/dalvikvm( 6161): VFY: replacing opcode 0x60 at 0x0061
W/dalvikvm( 6161): VFY: unable to resolve static field 5071 (common_google_play_services_unsupported_title) in Lcom/google/android/gms/R$string;
D/dalvikvm( 6161): VFY: replacing opcode 0x60 at 0x0073
W/dalvikvm( 6161): VFY: unable to resolve static field 5067 (common_google_play_services_network_error_title) in Lcom/google/android/gms/R$string;
D/dalvikvm( 6161): VFY: replacing opcode 0x60 at 0x0085
W/dalvikvm( 6161): VFY: unable to resolve static field 5065 (common_google_play_services_invalid_account_title) in Lcom/google/android/gms/R$string;
D/dalvikvm( 6161): VFY: replacing opcode 0x60 at 0x00af
W/dalvikvm( 6161): VFY: unable to resolve static field 5071 (common_google_play_services_unsupported_title) in Lcom/google/android/gms/R$string;
D/dalvikvm( 6161): VFY: replacing opcode 0x60 at 0x00ce
W/dalvikvm( 6161): VFY: unable to resolve static field 5060 (common_google_play_services_install_button) in Lcom/google/android/gms/R$string;
D/dalvikvm( 6161): VFY: replacing opcode 0x60 at 0x000f
W/dalvikvm( 6161): VFY: unable to resolve static field 5057 (common_google_play_services_enable_button) in Lcom/google/android/gms/R$string;
D/dalvikvm( 6161): VFY: replacing opcode 0x60 at 0x0016
W/dalvikvm( 6161): VFY: unable to resolve static field 5072 (common_google_play_services_update_button) in Lcom/google/android/gms/R$string;
D/dalvikvm( 6161): VFY: replacing opcode 0x60 at 0x001d
W/dalvikvm( 6161): VFY: unable to resolve static field 5068 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
D/dalvikvm( 6161): VFY: replacing opcode 0x60 at 0x0007
W/dalvikvm( 6161): VFY: unable to resolve static field 5062 (common_google_play_services_install_text_tablet) in Lcom/google/android/gms/R$string;
D/dalvikvm( 6161): VFY: replacing opcode 0x60 at 0x0018
W/dalvikvm( 6161): VFY: unable to resolve static field 5061 (common_google_play_services_install_text_phone) in Lcom/google/android/gms/R$string;
D/dalvikvm( 6161): VFY: replacing opcode 0x60 at 0x0038
W/dalvikvm( 6161): VFY: unable to resolve static field 5058 (common_google_play_services_enable_text) in Lcom/google/android/gms/R$string;
D/dalvikvm( 6161): VFY: replacing opcode 0x60 at 0x003f
W/dalvikvm( 6161): VFY: unable to resolve static field 5073 (common_google_play_services_update_text) in Lcom/google/android/gms/R$string;
D/dalvikvm( 6161): VFY: replacing opcode 0x60 at 0x0046
W/dalvikvm( 6161): VFY: unable to resolve static field 5070 (common_google_play_services_unsupported_text) in Lcom/google/android/gms/R$string;
D/dalvikvm( 6161): VFY: replacing opcode 0x60 at 0x0066
W/dalvikvm( 6161): VFY: unable to resolve static field 5066 (common_google_play_services_network_error_text) in Lcom/google/android/gms/R$string;
D/dalvikvm( 6161): VFY: replacing opcode 0x60 at 0x006d
W/dalvikvm( 6161): VFY: unable to resolve static field 5064 (common_google_play_services_invalid_account_text) in Lcom/google/android/gms/R$string;
D/dalvikvm( 6161): VFY: replacing opcode 0x60 at 0x0074
W/dalvikvm( 6161): VFY: unable to resolve static field 5069 (common_google_play_services_unsupported_date_text) in Lcom/google/android/gms/R$string;
D/dalvikvm( 6161): VFY: replacing opcode 0x60 at 0x007b
W/dalvikvm( 6161): VFY: unable to resolve static field 5068 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
D/dalvikvm( 6161): VFY: replacing opcode 0x60 at 0x000c
E/GooglePlayServicesUtil( 6161): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
E/GooglePlayServicesUtil( 6161): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
E/GooglePlayServicesUtil( 6161): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
E/GooglePlayServicesUtil( 6161): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
I/Corona ( 6161): ---------- inside google initCallback -------------
I/Corona ( 6161): ----------starting Google login -------------
D/BaseGameActivity( 6161): onCreate: creating GamesClient
E/GooglePlayServicesUtil( 6161): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
D/BaseGameActivity( 6161): onConnectionFailed: result 4
D/BaseGameActivity( 6161): onConnectionFailed: since user didn’t initiate sign-in, failing now.
I/Corona ( 6161): -------------- Google Play Game Services initCallback failed -------------
I/Corona ( 6161): event.isError = true
D/dalvikvm( 991): GC_CONCURRENT freed 1097K, 11% free 10793K/12044K, paused 3ms+4ms, total 61ms
E/GooglePlayServicesUtil( 6161): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
D/dalvikvm( 6161): GC_CONCURRENT freed 5022K, 39% free 8435K/13608K, paused 3ms+4ms, total 38ms
D/dalvikvm( 6161): GC_CONCURRENT freed 414K, 38% free 8481K/13608K, paused 3ms+3ms, total 29ms
D/dalvikvm( 6161): GC_CONCURRENT freed 357K, 38% free 8511K/13608K, paused 4ms+3ms, total 35ms
I/PowerManagerService( 443): Going to sleep by user request…
-------- END OF FULL LOG --------