java.lang.ClassNotFoundException: CoronaProvider.gameNetwork.google.LuaLoader

Hi guys,

I was putting a final touch to a game yesterday.

Everything worked fine. So I tried to put it on the Apple App store where I was rejected because it needed to be compiled for ios7 or something beginning february 2014.

So I updated the corona SDK I was using. Compile almost fine on the simulator.

Build for Android and BAM ! GPGS is crashing the app.

I did not change a thing. I’m using SDK Build: 2013.2100

02-28 12:04:08.232: W/System.err(8088): java.lang.ClassNotFoundException: CoronaProvider.gameNetwork.google.LuaLoader

02-28 12:04:08.232: W/System.err(8088):     at java.lang.Class.classForName(Native Method)

02-28 12:04:08.232: W/System.err(8088):     at java.lang.Class.forName(Class.java:204)

02-28 12:04:08.232: W/System.err(8088):     at java.lang.Class.forName(Class.java:169)

02-28 12:04:08.232: W/System.err(8088):     at com.ansca.corona.NativeToJavaBridge.callLoadClass(NativeToJavaBridge.java:375)

02-28 12:04:08.232: W/System.err(8088):     at com.ansca.corona.JavaToNativeShim.nativeResize(Native Method)

02-28 12:04:08.232: W/System.err(8088):     at com.ansca.corona.JavaToNativeShim.resize(JavaToNativeShim.java:317)

02-28 12:04:08.232: W/System.err(8088):     at com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onSurfaceChanged(CoronaGLSurfaceView.java:358)

02-28 12:04:08.237: W/System.err(8088):     at com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1611)

02-28 12:04:08.237: W/System.err(8088):     at com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1377)

02-28 12:04:08.237: W/System.err(8088): Caused by: java.lang.NoClassDefFoundError: CoronaProvider/gameNetwork/google/LuaLoader

02-28 12:04:08.237: W/System.err(8088):     … 9 more

02-28 12:04:08.237: W/System.err(8088): Caused by: java.lang.ClassNotFoundException: Didn’t find class “CoronaProvider.gameNetwork.google.LuaLoader” on path: /data/app/com.kayenko.bringbackjustinbieber-2.apk

02-28 12:04:08.237: W/System.err(8088):     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:64)

02-28 12:04:08.237: W/System.err(8088):     at java.lang.ClassLoader.loadClass(ClassLoader.java:501)

02-28 12:04:08.237: W/System.err(8088):     at java.lang.ClassLoader.loadClass(ClassLoader.java:461)

02-28 12:04:08.237: W/System.err(8088):     … 9 more

Any ideas ?

Thanks.

You probably don’t want Google Play Game Services plugin added when building for Apple.

How do you include your GPGS plugin in your build.settings?

Mine looks like this, and it doesn’t get included when building the app for iOS:
 

[“CoronaProvider.gameNetwork.google”] = { publisherId = “com.coronalabs”, supportedPlatforms = { android = true }, },

Naomi

Hey Naomi,

Thanks for your answer.

Actually it’s when I launch on my Android Galaxy Note II that I receive this error.

In my build settings I included the import only in the android section. So it should be ok. But to be sure I tried your way and it didn’t change anything.

Any other idea ?
 

Hmm… so when it used to work, what Corona build did you use?  And you’re sure you haven’t changed a thing for GPGS related code?  

BTW, I haven’t built any GPGS app with post Graphics 2.0 Corona build – so if it’s some bug introduced post Graphics 2.0 Corona build, I’m afraid I can be of no help.  I wonder if there are other devs who have successfully built GPGS app with Graphics 2.0 Corona build.

Naomi

Hey Naomi.

Yes I’m sure I didn’t change a thing. Tried to compile, got rejected, download the new version of Corona, relaunched the project.

Has anyone using the GPGS been able to build it for Android with the Build: 2013.2100

Really, nobody faced this issue ?

My game is ready and fully working for iOS but I’m stuck with this error on Android. 

I know it’s far fetched, but can anyone try to compile a simple project under corona Build: 2013.2100

These two lines in the main.lua

gameNetwork.init( “google” )

native.showAlert( “Corona”, “GPGS is working”, { “OK” } )

and  in the build.settings under the settings attribute:

[“CoronaProvider.gameNetwork.google”] = { publisherId = “com.coronalabs”, supportedPlatforms = { android = true }, },

Nothing else. 

Build it for Android and test on a device. If it works for you then you should see an alert box saying it’s working.

This would allow me to know that this is a corona bug and not something I’m doing wrong.

Thanks in advance.

 

I’ve just implemented gpgs into my graphics 2.0 built app and can login, view leaderboards etc. just not tested posting to it yet. But logging into it seems to work fine, but I’ve only tested on an android virtual machine using the android sdk. Hoping to test a device tonight.

Hey gazjm,

Thanks for your answer, I didn’t think about trying it in a virtual machine. I’m going to try now. Please be sure to post your result about your test on a real device tonight.

Thanks

Ok, found it !!!

I don’t know why it happened in the first place, but then when trying different things, I moved and used a few different bit of codes to include the GPGS in the build.settings file.

It happened that I had :

    android =

    {

        googlePlayGamesAppId = “1006262955359”, 

    plugins =

        {

            – key is the name passed to Lua’s 'require()'

            [“CoronaProvider.gameNetwork.google”] =

            {

                – required

                publisherId = “com.coronalabs”,

            },

        }, 

    },

Instead of

    android =

    {

        googlePlayGamesAppId = “1006262955359”,

           

    },

    plugins =

        {

            – key is the name passed to Lua’s 'require()'

            [“CoronaProvider.gameNetwork.google”] =

            {

                – required

                publisherId = “com.coronalabs”,

                supportedPlatforms = { android = true }

            },

            

        }, 

The first one does make sense to me, that’s why I never questionned it.

Thanks to Naomi and gazjm for your time !!

Now, on for the live posting on appstores :smiley:

You probably don’t want Google Play Game Services plugin added when building for Apple.

How do you include your GPGS plugin in your build.settings?

Mine looks like this, and it doesn’t get included when building the app for iOS:
 

[“CoronaProvider.gameNetwork.google”] = { publisherId = “com.coronalabs”, supportedPlatforms = { android = true }, },

Naomi

Hey Naomi,

Thanks for your answer.

Actually it’s when I launch on my Android Galaxy Note II that I receive this error.

In my build settings I included the import only in the android section. So it should be ok. But to be sure I tried your way and it didn’t change anything.

Any other idea ?
 

Hmm… so when it used to work, what Corona build did you use?  And you’re sure you haven’t changed a thing for GPGS related code?  

BTW, I haven’t built any GPGS app with post Graphics 2.0 Corona build – so if it’s some bug introduced post Graphics 2.0 Corona build, I’m afraid I can be of no help.  I wonder if there are other devs who have successfully built GPGS app with Graphics 2.0 Corona build.

Naomi

Hey Naomi.

Yes I’m sure I didn’t change a thing. Tried to compile, got rejected, download the new version of Corona, relaunched the project.

Has anyone using the GPGS been able to build it for Android with the Build: 2013.2100

Really, nobody faced this issue ?

My game is ready and fully working for iOS but I’m stuck with this error on Android. 

I know it’s far fetched, but can anyone try to compile a simple project under corona Build: 2013.2100

These two lines in the main.lua

gameNetwork.init( “google” )

native.showAlert( “Corona”, “GPGS is working”, { “OK” } )

and  in the build.settings under the settings attribute:

[“CoronaProvider.gameNetwork.google”] = { publisherId = “com.coronalabs”, supportedPlatforms = { android = true }, },

Nothing else. 

Build it for Android and test on a device. If it works for you then you should see an alert box saying it’s working.

This would allow me to know that this is a corona bug and not something I’m doing wrong.

Thanks in advance.

 

I’ve just implemented gpgs into my graphics 2.0 built app and can login, view leaderboards etc. just not tested posting to it yet. But logging into it seems to work fine, but I’ve only tested on an android virtual machine using the android sdk. Hoping to test a device tonight.

Hey gazjm,

Thanks for your answer, I didn’t think about trying it in a virtual machine. I’m going to try now. Please be sure to post your result about your test on a real device tonight.

Thanks

Ok, found it !!!

I don’t know why it happened in the first place, but then when trying different things, I moved and used a few different bit of codes to include the GPGS in the build.settings file.

It happened that I had :

    android =

    {

        googlePlayGamesAppId = “1006262955359”, 

    plugins =

        {

            – key is the name passed to Lua’s 'require()'

            [“CoronaProvider.gameNetwork.google”] =

            {

                – required

                publisherId = “com.coronalabs”,

            },

        }, 

    },

Instead of

    android =

    {

        googlePlayGamesAppId = “1006262955359”,

           

    },

    plugins =

        {

            – key is the name passed to Lua’s 'require()'

            [“CoronaProvider.gameNetwork.google”] =

            {

                – required

                publisherId = “com.coronalabs”,

                supportedPlatforms = { android = true }

            },

            

        }, 

The first one does make sense to me, that’s why I never questionned it.

Thanks to Naomi and gazjm for your time !!

Now, on for the live posting on appstores :smiley: