little problem with build.setting file , need a quick fix

hey, 

I have a build.setting that works perfectly only before I added the game network plugin, here’s the code

[lua]
settings = {
android = {
googlePlayGamesAppId = “4222*********”,
versionCode = “1”,
usesPermissions =
{
“android.permission.INTERNET”,
“android.permission.ACCESS_NETWORK_STATE”,
},
},
plugins = {
[“CoronaProvider.ads.admob”] =
{
publisherId = “com.coronalabs”
[“CoronaProvider.gameNetwork.google”] =
{
supportedPlatforms = { android = true }
},
},
},
orientation = {
default = “portrait”,
supported = { “portrait”, }
},
}[/lua]

what’s wrong with it, can’t build the game.

It really helps to indent your build.settings so that you can see where things are not right:

settings = {     android = {         googlePlayGamesAppId = "4222\*\*\*\*\*\*\*\*\*",         versionCode = "1",         usesPermissions =         {             "android.permission.INTERNET",             "android.permission.ACCESS\_NETWORK\_STATE",         },     },     plugins = {         ["CoronaProvider.ads.admob"] =         {             publisherId = "com.coronalabs"             ["CoronaProvider.gameNetwork.google"] =             {                 supportedPlatforms = { android = true }             },         },     },     orientation = {         default = "portrait",         supported = { "portrait", }     }, }

Notice how the admob code’s braces includes the google play plugin instead of the google play plugin being at the same level as admob?

^^

Hi again Rob, I really don’t know what you mean by indent ,<<<english is not my mother language,

but I didn’t understand where the error is, I copied the code you wrote but didn’t work

When I say indent, look at my version of your build.settings.  See how there is no space between the left edge and settings?  This represents a top level Lua table named settings.  I used spaces to move the next level of the table to the right.  The settings table has 3 sub tables named “android”, “plugins” and “orientation”.  By adding four spaces to their left, it “indents” them (shifts them to the right) so you can see how they line up:

settings = { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; android = { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; plugins = { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; orientation = { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } }

This use of space and lining up the closing brace with it’s table name helps you spot problems.  This is what I meant by indenting.

When I added this space, it became clear that you have a problem with your plugin block.  The plugin table contains one or more table entries, one for each plugin.  This isn’t an array type table, but a key-value pair type table.  Since the keys have special characters in them, it has to be done in the [“keyname”] format  instead of the keyname = format.  Therefore the plugin table looks like:

     plugins = {

           [“plugin.key.1”] = { publisherId = “com.coronalabs” },

           [“plugin.key.2”] = { pubisherId = “com.someoneelse”, supportedPlatforms = { another table },

    }

and so on.   What you have is this:

    plugins = {

          [“CoronaProvider.ads.admob”] = { publisherId = “com.coronalabs”, [“CoronaProvider.gameNetwork.google”] = { publisherId = “com.coronalabs” } }

    }

when it should be:

    plugins = {

          [“CoronaProvider.ads.admob”] = { publisherId = “com.coronalabs” },

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

     }

Maybe formatting it that way will be easier to understand than the traditional formatting.  See where your error is now?

so it should be lile this.right ?

[lua]settings = {

    android = {

        googlePlayGamesAppId = “42229912347”,

        versionCode = “1”,

        usesPermissions =

        {

            “android.permission.INTERNET”,

            “android.permission.ACCESS_NETWORK_STATE”,

        },

    },

    plugins = {

          [“CoronaProvider.ads.admob”] = { publisherId = “com.coronalabs” },

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

     },

    orientation = {

        default = “portrait”,

        supported = { “portrait”, }

    },

}[/lua]

but while building with this, there’s an error saying : 

[build error #5] unexpected build error (check the simulator console for messages.)

but there’s no messages.

up

The build settings looks fine now.  There should be additional information in the console windows.

You can also try building one of the sample apps like “Hello World” to make sure you’re logged in correctly and don’t have networking problems.

I tied to build the hello world sample and it went fine, but when I built it with my game’s build.setting file, the same error happens :

[build error #5] unexpected build error (check the simulator console for messages.), but there’s no messages in the console !

I just used the code you posted above and built for Android with no errors. 

Can you delete your build.settings and create it from scratch (copying and pasting the code above)? 

Rob

I tried but nothing changed, the same error, I’m using v2014.2189 ( 2014.3.6 ), are you an else version ?

I’m using the latest daily build, but there shouldn’t be any differences.  I tried it with 2189a as well and it worked as expected.

Just to verify, you took your build.settings and put it in the Hello World project and it gives you an error.  Yet Hello World with it’s build.settings works as expected?

Thanks

Rob

^

yes, I the original hello world’s build.setting works fine, but when I added the above build.setting the error happens

Can you zip up the hello world project with your build.settings and put it out on drop box and then post a link here, so we can download it and try and duplicate it?

here: 

https://www.dropbox.com/s/41013i9qoy2x6z8/HelloWorld.zip

Are you on a Mac or Windows?  OS version?

What version of Java do you have installed?

I was able to build with out an error.

Rob

I’m on windows, the java development kit’s version is 8u5-i586.

Windows 7, 8, 8.1, Vista or XP?

windows 7

I tried to build on another windows 7 device and the same error happens.

What version of Java is the 2nd machine running?