syntax error in build.setting : expected symbol near ’=’<<<what's wrong ?

Then what is line 49?  The error could actually be on either side, so also look at 48 and 50 and see if you see a problem around and equal sign?

Back to my first post.  You have a bunch of things that should be in the plist table that are just in the middle of your build.settings file.  Let me take a minute and explain this file a bit better.

build.settings contains a single Lua table called settings:

settings = {

}

It’s the only thing Corona reads.  So if you do:

settings = {

}

android = {

}

Corona won’t know anything about android.  You have to put the various pieces inside the settings table like this:

settings = {

     iphone = {

     },

     android = {

     },

     plugins = {

     },

     orientation = {

     },

}

See how that’s nested?   Anything iOS related goes in the iPhone table.  Anything Android related goes int he android table.  Plugins into plugins and so on.   The iphone table has a specific subtable that really contains everything iphone called a plist table:

settings = {

     iphone = {

          plist = {

          }

     },

     android = {

     },

     plugins = {

     },

     orientation = {

     },

}

Anything iOS related like anything that starts with UI like UIStatusBarHidden = false, has to go inside the plist table.  Your UIAppFonts, UIStatusBarHidden, UIPrerenderedIcon and all that coe for CFBungleUIRLTypes has to be a sub-table of plist and it is not.  The UIAppFonts on line 43 doesn’t go there and won’t do anything but it’s syntactically correct so it doesn’t give an error.  However on line 49, you have UIStatusBarHidden = false, which is causing your error.  Actually the curly brace on line 40 ends your settings file and is probably where the chaos beings in the rest of it.

Since you are only building for Android, I would completlly take out the iphone table and all the UI* parts and CF* parts.  Make sure you indent your code so that all  your braces line up so you can see your code structure.  Finally you have some android related items at the bottom that needs to be inside the android = {} table.

I want to to try and understand how this work.  Give this information a try and see if you can work this out.

Rob

hey again mr.Rob,

is this the way it should be ?

[lua]

settings = {
android = {
versionCode = “1”,
usesPermissions =
{
“android.permission.INTERNET”,
“android.permission.ACCESS_NETWORK_STATE”,
},
},
},
plugins = {
{
[“plugin.google.play.services”] =
{
publisherId = “com.coronalabs”
},
},
},
orientation = {
default = “portrait”,
supported = { “portrait”, }
},
}
[/lua]

Without indenting the code, it’s nearly impossible to know if your tables are nested correctly.

settings = { &nbsp;&nbsp;&nbsp; android = { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; versionCode = "1", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; usesPermissions = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "android.permission.INTERNET", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "android.permission.ACCESS\_NETWORK\_STATE", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; },&nbsp; -- closes usesPermissions &nbsp;&nbsp;&nbsp; },&nbsp; -- closes android },&nbsp; -- this is the end of your settings table.&nbsp; you will need to remove this one plugins = { &nbsp;&nbsp;&nbsp; {&nbsp; -- extra curley not needed .. remove this one &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ["plugin.google.play.services"] = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; publisherId = "com.coronalabs" &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }, &nbsp;&nbsp;&nbsp; }, -- extra curley not needed remove this one }, orientation = { &nbsp;&nbsp;&nbsp;&nbsp; default = "portrait", &nbsp;&nbsp;&nbsp;&nbsp; supported = { "portrait", } }, } -- this should be the end of the settings table

 

This is much closer now.  See how when I indented things, it made it easy to spot where things were not right?  I would remove the braces I indicated and indent the last blocks and you will be good to go.

 

Rob

Mr.Rob, 

I used this as you said :

[lua]settings = {
android = {
versionCode = “1”,
usesPermissions =
{
“android.permission.INTERNET”,
“android.permission.ACCESS_NETWORK_STATE”,
}, – closes usesPermissions
},
plugins = {

[“plugin.google.play.services”] =
{
publisherId = “com.coronalabs”
},
},
orientation = {
default = “portrait”,
supported = { “portrait”, }
},
}[/lua]

but I got an error saying :

A device build error occurred on the server.

Build ID : 53af1bda65e95

error : get plugin failed.

publisher : com.coronalabs

plugin: plugin.google.play.services.

Now we are onto a different issue.  Your build.settings is now good.  What you are running into is you are trying to use Google’s AdMob V2 plugin.  This is currently not available to Starter and Basic subscribers as it requires a code change we made in a later daily build.  The change is required by Google to make this plugin work and we can’t go back and fix the last public build.

You will be unable to use AdMob V2 until we release a new public build or you subscribe as a Pro or Enterprise subscriber (to get the daily builds).  I don’t have an ETA on the next public build.  We are aware that Google is forcing V2 on us at the end of August. 

In the mean time, you might want to try the V1 plugin instead.  http://docs.coronalabs.com/plugin/ads-admob/index.html

^^

thanks mr, Rob, I know built it when I install in a device all it does show is black screen, nothing happens, and no signs that thw app is alive, the tested devices are note 3 and galaxy s 4

Black screen?  Read this:

http://coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/

Rob

^^

I read the topic but I couldn’t find out why it’s showing black screen, I searched for errors and couldn’t find one

There has to be something there.  The #1 cause is case sensitivity of file names.  The devices are case sensitive, the simulator is not.  So if you have a file name like:  image.PNG but you call it image.png then you will get an error.  Check all your file names and scene names to make sure you don’t have a case sensitivity.

Rob

thanks, mr.Rob, every thing now works fine because of your help, I really thank you so much for helping with this, thanks a lot man.