[Resolved] GPGS: gameNetwork.init does nothing... with an error: Google Play services resources not found

Naomi,

I just implemented GPGS yesterday and ran into the same problem but was pretty simple to fix (at least in my case).

You don’t even need to publish an alpha build of your app or publish your GPGS data to get it working, just have your app ready to publish and by that I mean add some dummy store data, and upload your apk from that point when you run through the wizard and put in the product id of your app it should pick up the rest of the info for you and link the two.

First things first is to go to the developer console (API) (https://code.google.com/apis/console) and make sure you have Google Play Game Services and Google Play Game Management turned on which seems fairly obvious lol

I just created a test for GPGS and wrote down the steps I took and everything worked with zero issues.

1:  Create a new application in Google Developer (just store listing not APK) – (just add dummy info for desc and hit save)

2: Click on services and APIs and grab the license key and put it in the config.lua file (application->license section)

3: Compile my APK and upload it (don’t publish just save)

4: Click on Game Services and Add New Game

5: Use “I don’t use any google apis in my game yet” and fill in the name and category.

6: Follow the wizard and clicking next etc.

7: Make sure you put in the product id (com.yourapp.game) of your build when asked.

8: IGNORE the SHA stuff it will auto-add it for you (at least that has been my experience) and continue.

9: Take the number it gives you (which should say something like this is the only number you need)

10: Add that number to your build.settings file for googlePlayGamesAppId in the android section.

11: Add 5 achievements and 1 leaderboard.

12: In testing (Game Services->Game Item->Testing) add the gmail account of the “logged in” account of your android device (doesn’t need to be in alpha or beta).

12: add the codes to the lua note: I add to google first so i can use the same ID on apple.

local leaderID = "CgkI7Lva9bAbEAIQBg" local achievementID = { {key = "A1", id = "CgkI7Lva9bAbEAIQAQ"}, {key = "A2", id = "CgkI7Lva9bAbEAIQAg"}, {key = "A3", id = "CgkI7Lva9bAbEAIQAw"}, {key = "A4", id = "CgkI7Lva9bAbEAIQBA"}, {key = "A5", id = "CgkI7Lva9bAbEAIQBQ"}, }

13: Add this (USE::userInitiated = true) NOT FALSE -> using false made everything fail on my side (just a side note))

 gameNetwork = require "gameNetwork" gameNetwork.init("google") gameNetwork.request("login",{userInitiated = true}) 

14: Test with

--Show Leaderboards timer.peformWithDelay(1000, function() gameNetwork.show("leaderboards") end, 1) --Show Achievements timer.peformWithDelay(1000, function() gameNetwork.show("achievements") end, 1) --Unlock Achievement timer.peformWithDelay(1000, function() gameNetwork.request("unlockAchievement", {achievement = {identifier = achievementID["A1"].id}}) end, 1)

If you use USB debugging on your android like me.

14: plug in your device to your computer
15: Rebuild and push to your device with adb -d install -r “C:\path\mygame.apk”

16: run adb logcat

17: run your game and see what is going on :slight_smile:

18: everything works fine :slight_smile:

Not sure if that helps but those are the steps I just did on a brand new project in corona.

Christopher, thank you for the detailed steps you took to successfully implement leaderboard and achievements.

I think I covered all of the steps you described, except for the Step 8 related to SHA1.  I’m wondering why pre-filled SHA1 worked for you.  I’ve had SHA1 issue with one of my already released game, and the problem was due to simply accepting the pre-filled SHA1 at that time.  

I had exchanged emails with Google person when this SHA1 caused me headache – I wonder if they fixed it so that their system can automatically retrieve correct SHA1 now?  But then it feels odd, because the password is required for the keystore before the SHA1 can be retrieved, and unless you supply it, how can Google Play Developer Console know what might be the correct SHA1 for the uniqe keystore we use for each of our app/game?

Anyhow, I made sure to confirm/retrieve SHA1 using terminal with the following command:

keytool -exportcert -alias myappalias -keystore myapp.keystore -list -v

where myapp would be replaced with the name of my app.

Regardless, I really appreciate you providing the full, detailed steps.  I’m sure a lot of devs on this Forum would appreciate it.

And I totally appreciate you letting me know that it really isn’t necessary to publish the app or publish the game services before the testing can be done.

So now, I can eliminate published / not-published from potential list of reasons why it isn’t working for me.

Here’s what I do in my main.lua:

[lua]

– require gameNetwork

local gameNetwork = require( “gameNetwork” )

– later on

local function loadLocalUser( event )

     print("---------- inside google loadLocalUser ----------")

     if event.isError then

          print("event.isError = " … tostring(event.isError))

    elseif (event.data) then

        print("---------- login successful ----------") 

    end

end

local function initCallback( event )

     if event.isError then

          print("event.isError = " … tostring(event.isError))

    elseif event.data then

        print("---------- starting Google login ----------")

        gameNetwork.request(“login”, { userInitiated = false, listener = loadLocalUser })

    end

end

print("------- calling gameNetwork.init ---------")

gameNetwork.init( “google”, initCallback )

[/lua]

And here’s the terminal output relevant to the above:

I/Corona  ( 4249): ---------- calling gameNetwork.init ----------

V/Corona  ( 4249): > Class.forName: CoronaProvider.gameNetwork.google.LuaLoader

V/Corona  ( 4249): < Class.forName: CoronaProvider.gameNetwork.google.LuaLoader

V/Corona  ( 4249): Loading via reflection: CoronaProvider.gameNetwork.google.LuaLoader

I/Corona  ( 4249): ---------- inside google initCallback ----------

I/Corona  ( 4249): ---------- starting Google login ----------

D/BaseGameActivity( 4249): onCreate: creating GamesClient

E/GooglePlayServicesUtil( 4249): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.

D/BaseGameActivity( 4249): onConnectionFailed: result 4

D/BaseGameActivity( 4249): onConnectionFailed: since user didn’t initiate sign-in, failing now.

I/Corona  ( 4249): ---------- inside google loadLocalUser ----------

I/Corona  ( 4249): event.isError = true

------------------------------ End of Terminal Output ------------------------------

Once my game comes to my home screen, I go to GPGS sign-in scene where I have:

[lua]

– require gameNetwork

local gameNetwork = require( “gameNetwork” )

– later on

local function loadLocalUser( event )

     print("---------- inside google loadLocalUser ----------")

     if event.isError then

          print("event.isError = " … tostring(event.isError))

     elseif then

          print("---------- login successful ----------")

     end

end

local function initCallback( event )

     if event.isError then

          print("event.isError = " … tostring(event.isError))

     elseif event.data then

          print("---------- starting Google login ----------")

          gameNetwork.request(“login”, { userInitiated = true, listener = loadLocalUser })

     end

end

print("------- calling gameNetwork.init ---------")

gameNetwork.init( “google”, initCallback )

[/lua]

And here’s the terminal output from this scene when I tap on “Sign In” button:

I/Corona  ( 4249): ---------- calling gameNetwork.init ----------

I get nothing else.

I can return back to my home screen, then go to game play screen, and play the game.  I can pretty much do everything else the my game app allows for (except for in-app billing which I haven’t tested yet – I figure I should get the GPGS working first.)  So it’s as if gameNetwork.init is never called the second time.

How am I suppose to debug this thing…?

Naomi

Naomi,

Ahhhhh, the famous “The Google Play services resources were not found” error I battled with this for about two days before figuring out what the deal was and haven’t had it since lol… 

I won’t be back at my dev machine until tomorrow but will pull up the code and the notes that I found to resolve it, it had nothing to do with SHA etc. and will post once I get the code maybe that will resolve your issue.

Regarding SHA I am not sure if they fixed it or not as it wasn’t until two weeks ago that I decided to try the game network but it seems to read it from my current keystore so haven’t bothered to look into it further just hit the next button and get the id back from google lol…

Christopher

Christopher,

That is so reassuring.  I look forward to hearing how you resolved this thing.  I’m at my wits end.

Naomi

Naomi, are you using:

adb logcat

or

adb logcat Corona:v \*:s

???  The second form only shows messages from your Corona Activity and you won’t get messages from other apps like Google Play.   Of course this means you get every thing making it harder to find the messages, but you might be missing some messages that could help.

I did not have to publish my app, though I did.  I did not have to publish the GPGS service.  As soon as I had all green check marks, it started working.

Rob

Rob, I’m using adb logcat.

If I do adb logcat Corona:v *:s , I believe I would only see output that starts with …/Corona and nothing else.

Thank you so much for thinking about this.

Naomi

P.S., I got all green check marks, and I published it – even then, it fails in main.lua and nothing happens in GPGS sign-in screen…

Is it trying to login?  Do you get a popup from Google Play?

No, I don’t get anything.  

In main.lua, it silently fails (with event.isError = true), and in GPGS sign-in screen, nothing happens – I don’t even get event.isError returned.

Naomi

I’m confused.  You say you don’t get any thing, but then you say you get the GPGS sign in screen. 

Rob

Hi Rob, I was away and didn’t see your reply post until now.  And I’m sorry about the confusion.  

When I mentioned “GPGS sign in screen”, I meant a scene I added (say, myGPGS.lua scene).  I should’ve said “GPGS sign in scene” to be a little clearer…

Anyhow, on this scene, I have three buttons:

  1.  Leaderboard

  2.  Achievement

  3.  Sign in

What it does when I tap on “Sign in” button is to fire gameNetwork.init( “google”, initCallback ).  And here is the relevant set of code:

[lua]

– require gameNetwork

local gameNetwork = require( “gameNetwork” )

– later on

local function loadLocalUser( event )

     print("---------- inside google loadLocalUser ----------")

     if event.isError then

          print("event.isError = " … tostring(event.isError))

     elseif then

          print("---------- login successful ----------")

     end

end

local function initCallback( event )

     if event.isError then

          print("event.isError = " … tostring(event.isError))

     elseif event.data then

          print("---------- starting Google login ----------")

          gameNetwork.request(“login”, { userInitiated = true, listener = loadLocalUser })

     end

end

print("------- calling gameNetwork.init ---------")

gameNetwork.init( “google”, initCallback )

[/lua]

When I tap on “Sign in” button, all I see on terminal (with  adb logcat ) is the “------- calling gameNetwork.init ---------” and nothing else.  

I can keep tapping this “Sign in” button, and it simply spits out “------- calling gameNetwork.init ---------” over and over and nothing else.

Naomi

So, out of desperation, I created an entirely new keystore with new package name, and took every single step that Christopher noted above.  Yes, everything look good.  All green and ready to publish.

I even commented out ads that require game service.

But I still get the dreadful “The Google Play services resources were not found” error.

Anyone with any clue why this is happening?

Naomi

P.S.  On the side note, SHA1 thing was amazing.  I retrieved the SHA1 using terminal command ahead of time, and then when I went on to authorize the app, the SHA1 that Google Play pre-filled matched exactly that of what I retrieved earlier.  So Google engineers did fix the bug so that there are one less thing that could cause us grief along the way.

P.P.S.  Next up is putting together a very simple app that just signs in to GPGS and do nothing else.  If it works (and I hope it does work), then I’ll go back to my game code and figure out where things went wrong…

Hi Naomi.

Your code looks like it should work.  I’ve spent some time researching the error your getting.  It’s a very common error for Maps and AdMob.  But even for the posts including GPGS, the common response seems to be that the library isn’t being included.  I don’t see your build.settings in the previous posts.  Are you sure you don’t have an error in your build.settings that could be causing the plugin to not load?

Rob

Hi Rob,

Thank you so much for looking into this error. 

Below is my build.settings for Android build.  I appreciate you eyeballing it for me.

I plan on removing_ .permission.C2D_MESSAGE_ and com.google.android.c2dm.permission.RECEIVE permissions because, if I remember correctly, I added them for push notifications in 2 other games I released, but I don’t plan on adding it in my latest app.

And if you can easily tell what other permissions I can get rid of without looking up (I mean I respect your time and don’t expect you to look it up for me), please let me know.  All I need are permissions for in-app product, leaderboards, achievements and ads (Vungle and probably Chartboost.)

Thanks again.

Naomi

[lua]

– build.settings for Android

settings = {

    orientation = {

        default = “landscapeRight”,

        supported = 

        {

            “landscapeRight”, “landscapeLeft”, 

        },

    },

    android =

    {

        googlePlayGamesAppId = “xxxxxxxxxxxxxxx”, – Google Play Games App Id

    

        usesExpansionFile = true,

        permissions =

        {

            { name = “.permission.C2D_MESSAGE”, protectionLevel = “signature” },

        },

        

        usesPermissions =

        {

            “com.android.vending.BILLING”,

            “android.permission.GET_ACCOUNTS”,

            “android.permission.RECEIVE_BOOT_COMPLETED”,

            “com.google.android.c2dm.permission.RECEIVE”,

            “.permission.C2D_MESSAGE”,

            “android.permission.INTERNET”,

            “android.permission.ACCESS_WIFI_STATE”,

            “android.permission.ACCESS_NETWORK_STATE”,

            “com.android.vending.CHECK_LICENSE”, – need this for extension file

            “android.permission.WRITE_EXTERNAL_STORAGE”, – need this for Vungle ads & for extension file

         },

    },

    plugins =

    {

        – GOOGLE PLAY SERVICES (required for delivering ads)

        [“plugin.google.play.services”] = 

        {

            publisherId = “com.coronalabs”, supportedPlatforms = { android = true }, 

        },

        – GOOGLE PLAY GAME SERVICES

        [“CoronaProvider.gameNetwork.google”] = 

        { 

            publisherId = “com.coronalabs”, supportedPlatforms = { android = true }, 

        },

        – GOOGLE IAP V3 

        [“plugin.google.iap.v3”] = 

        { 

            publisherId = “com.coronalabs”, supportedPlatforms = { android = true }, 

        },

        – VUNGLE ADS FOR IOS AND GOOGLE

        [“CoronaProvider.ads.vungle”] = 

        { 

            publisherId = “com.vungle”, supportedPlatforms = { iphone = true, android = true }, 

        },      

        – CHARTBOOST ADS FOR IOS (GOOGLE version coming soon)

        [“plugin.chartboost”] = 

        { 

            publisherId = “com.gremlininteractive”, supportedPlatforms = { iphone = true }, 

        },

    },

}

[/lua]

EDIT:  I have license key in config.lua too that looks like this:

[lua]

application = 

    license = {

        googe = { key = “SuperDuperLoooooongTextString”,},

    },

}

[/lua]

-- I have license key in config.lua too application =&nbsp; &nbsp; &nbsp; &nbsp; license = { &nbsp; &nbsp; &nbsp; &nbsp; googe = { key = "SuperDuperLoooooongTextString",}, &nbsp; &nbsp; }, }

 

This should not be in build.settings.  It’s part of config.lua.   You also have google spelled wrong above.  Do you have it correct in your config.lua as well?

Yes, sorry, Rob.  I tried to post it too quickly, I suppose.  That bit is in my config.lua (not in build.settings).  I’ll edit the post so that it’s not too confusing.

Thanks!

Naomi

Hi Rob,

I put together totally stripped down app (only main.lua, build.settings and config.lua).

I built APK using the brand new keystore that I created earlier today.  But it’s giving me the exact same error.  Please see main.lua, build.settings and config.lua along with the full log below.

The log shows the terminal output from the moment I launch the app and then tap on Sign In button three times.

I have no clue where things are going wrong.

Thanks again for looking at this for me.

Naomi

main.lua:

[lua]

display.setStatusBar( display.HiddenStatusBar ); --Hide status bar from the beginning

local gameNetwork = require( “gameNetwork” )

local json = require( “json” )

local widget = require( “widget” )

local function loadLocalUser( event )

    print("---------- inside google loadLocalUser ----------")

    if event.isError then

        print("---------- login request failed ----------") 

        print("event.isError = " … tostring(event.isError))

        native.showAlert( “Login Failed”, “Login Failed”, { “OK” } )

    else

        – [edit] it returns event.isError or nothing

        print("---------- login successful ----------")

        native.showAlert( “Login Successful”, “Login Successful!”, { “OK” } )

    end

end

local function initCallback( event )

    print("---------- inside google initCallback ----------")

    if event.isError then

        print("---------- init failed ----------") 

        print("event.isError = " … tostring(event.isError))

        native.showAlert( “Init Failed”, “Init Failed”, { “OK” } )

    else

        – [edit] it returns event.isError or nothing

        print("---------- starting Google login ----------")

        – Tries to automatically log in the user without displaying the login screen if the user doesn’t want to login

        gameNetwork.request(“login”, { userInitiated = false, listener = loadLocalUser })

    end

end

print("---------- calling gameNetwork.init ----------")

gameNetwork.init( “google”, initCallback )

local function onSystemEvent( event ) 

    if ( event.type == “applicationStart” ) then

        print("------- START of applicationStart ----------")

    elseif ( event.type == “applicationSuspend” ) then 

    

    elseif ( event.type == “applicationResume” ) then

        print("------- START of applicationResume ----------")

    end

end

Runtime:addEventListener( “system”, onSystemEvent )

local signInNow = function()

    local function loadLocalUser( event )

        print("---------- inside loadLocalUser ----------")

        if event.isError then

            print("---------- login request failed ----------") 

            print("event.isError = " … tostring(event.isError))

            native.showAlert( “Login Failed”, “Login Failed”, { “OK” } )

        else

            – it returns event.isError or nothing

            print("---------- login successful ----------")

            native.showAlert( “Login Successful”, “Login Successful!”, { “OK” } )

        end

    end

    local function initCallback( event )

        print("---------- inside initCallback ----------")

        if event.isError then

            print("---------- init failed ----------") 

            print("event.isError = " … tostring(event.isError))

            native.showAlert( “Init Failed”, “Init Failed”, { “OK” } )

        else

            – it returns event.isError or nothing

            print("---------- starting Google login ----------")

            gameNetwork.request(“login”, { userInitiated = true, listener = loadLocalUser })

        end

    end

    print("---------- calling gameNetwork.init ----------")

    gameNetwork.init( “google”, initCallback )

end

local gcSignIn = widget.newButton{

    defaultFile = “btn1.png”,

    overFile = “btn2.png”,

    width = 190,

    height = 42,

    label = “SING IN”,

    labelColor = { default={1.0}, over={1.0} },

    fontSize = 20,

    onRelease = signInNow

}

gcSignIn.x = display.contentCenterX

gcSignIn.y = display.contentCenterY

[/lua]

build.settings:

[lua]

settings = {

    orientation = {

        default = “landscapeRight”,

        supported =

        {

            “landscapeRight”, “landscapeLeft”, 

        },

    },

    android =

    {        

        googlePlayGamesAppId = “1234567890”, – Google Play Games App Id

        usesPermissions =

        {

            – Google Play only

            “com.android.vending.BILLING”,

            “android.permission.GET_ACCOUNTS”,

            “android.permission.RECEIVE_BOOT_COMPLETED”,

            “android.permission.INTERNET”,

            “android.permission.ACCESS_WIFI_STATE”,

            “android.permission.ACCESS_NETWORK_STATE”,

            “com.android.vending.CHECK_LICENSE”, – need this for extension file

            “android.permission.WRITE_EXTERNAL_STORAGE”, – need this for Vungle ads & for extension file

        },

    },

    plugins =

    {

        – GOOGLE PLAY SERVICES (required for delivering ads)

        [“plugin.google.play.services”] = 

        { 

            publisherId = “com.coronalabs”, supportedPlatforms = { android = true }, 

        },

        

        – GOOGLE PLAY GAME SERVICES

        [“CoronaProvider.gameNetwork.google”] = 

        { 

            publisherId = “com.coronalabs”, supportedPlatforms = { android = true }, 

        },

        – GOOGLE IAP V3 

        [“plugin.google.iap.v3”] = 

        { 

            publisherId = “com.coronalabs”, supportedPlatforms = { android = true }, 

        },

    },

}

[/lua]

config.lua (misspelling edited):

[lua]

application = 

{

    launchPad = false,

    license = {

        google = { key = “SuperDuperLoooooongTextString”,},

    },

    

    content = 

    { 

        width = 320,

        height = 480,

        scale = “letterbox”, 

        fps = 60,

        imageSuffix =

        {

            ["@2x"] = 1.5,

            ["@4x"] = 3.0,

        },

    },

}

[/lua]

-------- FULL LOG --------

I/ActivityManager(  432): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.mycompany.myapp/com.ansca.corona.CoronaActivity} from pid 677

D/dalvikvm(  432): GC_FOR_ALLOC freed 334K, 39% free 16646K/26880K, paused 68ms, total 69ms

D/dalvikvm(  432): GC_FOR_ALLOC freed 506K, 40% free 16387K/26880K, paused 60ms, total 61ms

I/ActivityManager(  432): Start proc com.mycompany.myapp for activity com.mycompany.myapp/com.ansca.corona.CoronaActivity: pid=17647 uid=10027 gids={50027, 1015, 3003, 1028}

D/dalvikvm(17647): Trying to load lib /data/app-lib/com.mycompany.myapp-1/liblua.so 0x41dca170

D/dalvikvm(17647): Added shared lib /data/app-lib/com.mycompany.myapp-1/liblua.so 0x41dca170

D/dalvikvm(17647): No JNI_OnLoad found in /data/app-lib/com.mycompany.myapp-1/liblua.so 0x41dca170, skipping init

D/dalvikvm(17647): Trying to load lib /data/app-lib/com.mycompany.myapp-1/libjnlua5.1.so 0x41dca170

D/dalvikvm(17647): Added shared lib /data/app-lib/com.mycompany.myapp-1/libjnlua5.1.so 0x41dca170

D/dalvikvm(17647): Trying to load lib /data/app-lib/com.mycompany.myapp-1/libjnlua5.1.so 0x41dca170

D/dalvikvm(17647): Shared lib ‘/data/app-lib/com.mycompany.myapp-1/libjnlua5.1.so’ already loaded in same CL 0x41dca170

I/dalvikvm(17647): threadid=1: recursive native library load attempt (/data/app-lib/com.mycompany.myapp-1/libjnlua5.1.so)

D/dalvikvm(17647): Trying to load lib /data/app-lib/com.mycompany.myapp-1/libopenal.so 0x41dca170

I/OpenAL_SLES(17647): alc_opensles_init

D/dalvikvm(17647): Added shared lib /data/app-lib/com.mycompany.myapp-1/libopenal.so 0x41dca170

D/dalvikvm(17647): Trying to load lib /data/app-lib/com.mycompany.myapp-1/libmpg123.so 0x41dca170

D/dalvikvm(17647): Added shared lib /data/app-lib/com.mycompany.myapp-1/libmpg123.so 0x41dca170

D/dalvikvm(17647): No JNI_OnLoad found in /data/app-lib/com.mycompany.myapp-1/libmpg123.so 0x41dca170, skipping init

D/dalvikvm(17647): Trying to load lib /data/app-lib/com.mycompany.myapp-1/libalmixer.so 0x41dca170

D/dalvikvm(17647): Added shared lib /data/app-lib/com.mycompany.myapp-1/libalmixer.so 0x41dca170

D/dalvikvm(17647): No JNI_OnLoad found in /data/app-lib/com.mycompany.myapp-1/libalmixer.so 0x41dca170, skipping init

D/dalvikvm(17647): Trying to load lib /data/app-lib/com.mycompany.myapp-1/libcorona.so 0x41dca170

D/dalvikvm(17647): Added shared lib /data/app-lib/com.mycompany.myapp-1/libcorona.so 0x41dca170

D/dalvikvm(17647): GC_CONCURRENT freed 187K, 4% free 7757K/8008K, paused 4ms+3ms, total 42ms

D/libEGL  (17647): loaded /system/lib/egl/libEGL_tegra.so

D/libEGL  (17647): loaded /system/lib/egl/libGLESv1_CM_tegra.so

D/libEGL  (17647): loaded /system/lib/egl/libGLESv2_tegra.so

D/OpenGLRenderer(17647): Enabling debug mode 0

D/dalvikvm(17647): Note: class Landroid/opengl/GLWrapperBase; has 250 unimplemented (abstract) methods

V/GLSurfaceView(17647): glGetString(7937) returns NVIDIA Tegra 3;

I/ActivityManager(  432): Displayed com.mycompany.myapp/com.ansca.corona.CoronaActivity: +440ms

V/Corona  (17647): > Class.forName: network.LuaLoader

V/Corona  (17647): < Class.forName: network.LuaLoader

V/Corona  (17647): Loading via reflection: network.LuaLoader

I/Corona  (17647): Platform: Nexus 7 / ARM Neon / 4.3 / NVIDIA Tegra 3 / OpenGL ES 2.0 14.01003 / 2014.2381

V/Corona  (17647): > Class.forName: CoronaProvider.licensing.google.LuaLoader

V/Corona  (17647): < Class.forName: CoronaProvider.licensing.google.LuaLoader

V/Corona  (17647): Loading via reflection: CoronaProvider.licensing.google.LuaLoader

I/Corona  (17647): ---------- calling gameNetwork.init ----------

D/dalvikvm(17647): GC_FOR_ALLOC freed 375K, 6% free 7704K/8144K, paused 23ms, total 23ms

I/dalvikvm-heap(17647): Grow heap (frag case) to 11.489MB for 4096016-byte allocation

D/dalvikvm(17647): GC_FOR_ALLOC freed <1K, 4% free 11704K/12148K, paused 20ms, total 20ms

V/Corona  (17647): > Class.forName: CoronaProvider.gameNetwork.google.LuaLoader

V/Corona  (17647): < Class.forName: CoronaProvider.gameNetwork.google.LuaLoader

V/Corona  (17647): Loading via reflection: CoronaProvider.gameNetwork.google.LuaLoader

D/dalvikvm(17647): GC_CONCURRENT freed 14K, 4% free 11710K/12148K, paused 4ms+2ms, total 29ms

I/Corona  (17647): ------- START of applicationStart ----------

W/dalvikvm(17647): VFY: unable to resolve static field 4997 (common_google_play_services_install_title) in Lcom/google/android/gms/R$string;

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x004b

W/dalvikvm(17647): VFY: unable to resolve static field 4993 (common_google_play_services_enable_title) in Lcom/google/android/gms/R$string;

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x0056

W/dalvikvm(17647): VFY: unable to resolve static field 5008 (common_google_play_services_update_title) in Lcom/google/android/gms/R$string;

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x0061

W/dalvikvm(17647): VFY: unable to resolve static field 5005 (common_google_play_services_unsupported_title) in Lcom/google/android/gms/R$string;

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x0073

W/dalvikvm(17647): VFY: unable to resolve static field 5001 (common_google_play_services_network_error_title) in Lcom/google/android/gms/R$string;

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x0085

W/dalvikvm(17647): VFY: unable to resolve static field 4999 (common_google_play_services_invalid_account_title) in Lcom/google/android/gms/R$string;

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x00af

W/dalvikvm(17647): VFY: unable to resolve static field 5005 (common_google_play_services_unsupported_title) in Lcom/google/android/gms/R$string;

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x00ce

W/dalvikvm(17647): VFY: unable to resolve static field 4994 (common_google_play_services_install_button) in Lcom/google/android/gms/R$string;

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x000f

W/dalvikvm(17647): VFY: unable to resolve static field 4991 (common_google_play_services_enable_button) in Lcom/google/android/gms/R$string;

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x0016

W/dalvikvm(17647): VFY: unable to resolve static field 5006 (common_google_play_services_update_button) in Lcom/google/android/gms/R$string;

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x001d

W/dalvikvm(17647): VFY: unable to resolve static field 5002 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x0007

W/dalvikvm(17647): VFY: unable to resolve static field 4996 (common_google_play_services_install_text_tablet) in Lcom/google/android/gms/R$string;

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x0018

W/dalvikvm(17647): VFY: unable to resolve static field 4995 (common_google_play_services_install_text_phone) in Lcom/google/android/gms/R$string;

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x0038

W/dalvikvm(17647): VFY: unable to resolve static field 4992 (common_google_play_services_enable_text) in Lcom/google/android/gms/R$string;

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x003f

W/dalvikvm(17647): VFY: unable to resolve static field 5007 (common_google_play_services_update_text) in Lcom/google/android/gms/R$string;

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x0046

W/dalvikvm(17647): VFY: unable to resolve static field 5004 (common_google_play_services_unsupported_text) in Lcom/google/android/gms/R$string;

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x0066

W/dalvikvm(17647): VFY: unable to resolve static field 5000 (common_google_play_services_network_error_text) in Lcom/google/android/gms/R$string;

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x006d

W/dalvikvm(17647): VFY: unable to resolve static field 4998 (common_google_play_services_invalid_account_text) in Lcom/google/android/gms/R$string;

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x0074

W/dalvikvm(17647): VFY: unable to resolve static field 5003 (common_google_play_services_unsupported_date_text) in Lcom/google/android/gms/R$string;

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x007b

W/dalvikvm(17647): VFY: unable to resolve static field 5002 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;

D/dalvikvm(17647): VFY: replacing opcode 0x60 at 0x000c

E/GooglePlayServicesUtil(17647): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.

I/Corona  (17647): ---------- inside google initCallback ----------

I/Corona  (17647): ---------- starting Google login ----------

D/BaseGameActivity(17647): onCreate: creating GamesClient

E/GooglePlayServicesUtil(17647): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.

D/BaseGameActivity(17647): onConnectionFailed: result 4

D/BaseGameActivity(17647): onConnectionFailed: since user didn’t initiate sign-in, failing now.

I/Corona  (17647): ---------- inside google loadLocalUser ----------

I/Corona  (17647): ---------- login request failed ----------

I/Corona  (17647): event.isError = true

W/InputMethodManagerService(  432): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@423d6f98 attribute=null, token = android.os.BinderProxy@4242fa80

I/Corona  (17647): ---------- calling gameNetwork.init ----------

I/Corona  (17647): ---------- calling gameNetwork.init ----------

I/Corona  (17647): ---------- calling gameNetwork.init ----------

Hi Naomi. 

I will try to build your app tonight using my GPGS app settings (license key, keystore, id, etc.) and see what I can get.  You still have “google” misspelled “googe” in your config.lua.  This very well could be your issue.  Also, it’s very important that you build with the keystore you told GPGS you were going to use when you provided them the SHA1 value.  That SHA1 is a mathematical calculation (think of like a check sum) that verifies the keystore in the app is valid and your app hasn’t been hacked or someone is trying to hack your GPGS setup.  You must build with the keystore that goes with that SHA1 value.  Google won’t automatically update it for  you, even though they seem to figure it out initially.

So fix your config.lua and try with the original keystore used to generate the SHA1 string and let me know if that helps.  If not I’ll try to build it tonight when I have more time.

Rob

Rob,

Actually you don’t need to do that with the keystore anymore it will read the keystore SHA from the product that you have listed via com.yourproduct.id (AFTER you upload your apk that is).

Google resolved this issue about a month ago, you only need to do that if you have NOT uploaded your apk to the console.

Still good practice to do what you suggest but for people that are not familiar with the inner workings of ssl and google I would suggest they upload their apk before even attempting the wizard process.

I just got back and going to build a little sample app for Naomi after I have some coffee and my eyes are not so blurry :slight_smile:

At first glance, I think you might have actually hit the nail on the head with the issue “googe” vs. “google”.

Christopher

Naomi,

Sample File: https://s3.amazonaws.com/example_code/GPGS.zip

Most of these steps are not required but since you are using messages etc. just figured I would throw them in :slight_smile:

1: In build.settings change GPGS_ID with the ID in Game Services for the app you are using.

2: From your application (in dev console) click on Services & APIS and copy your “YOUR LICENSE KEY FOR THIS APPLICATION” to config.lua->application->license->google->key->key=“YOUR_PROJECT_KEY”

3: Copy your API key from console API to config.lua->notification->google-projectNumber = “YOUR_API_PROJECT_ID”

4: Open main.lau

5: Change line 7 leaderboardId = “YOUR_LEADER_ID” to the ID that is listed in leadersboards in Game Services.

6: Change line 119 UnlockAchievement(“YOUR_ACHIEVEMENT_ID”) to any achievement ID that is listed in your Achievements.

Build using the product id listed in “Linked Apps” -> “com.your.productid”

IMPORTANT: Because Game Services will try and keep you logged in for the app you are using, goto your google device and uninstall the app before proceeding (just to make sure nothing is cached)

Once you have built your app, drop to command line and type 

adb -d install -r “C:\location\file.apk” 

swap out location and file for your values.

Once install complete open app on your device and everything should be working, tested on 4 different GPGS setups as well as creating a new one using the steps I had mentioned before.

OK NOW ON TO WHAT I FOUND.

First and foremost you can ignore the Google Play Resources Not Found message it is a false positive and is being caused by com.google.android.gms.common.GooglePlayServicesUtil.class which is a error in google itself and has nothing to do with corona and will not stop you from proceeding with GPGS so don’t worry about that just make sure it tests and works correctly the rest can be ignored.

Let me know if you have any issues.

@Rob, thank you so much for finding the misspelling – I corrected it and built my test project (and I really hoped it was the cause of it all), but it turns out I still get the exact same terminal output with “The Google Play services resources were not found” error.  (I can’t believe terminal output is the same, though.)

@Christopher, thank you so much for the sample file.  I really appreciate it.  I’ll test it and post back with result.

Naomi