Corona on Android loads config.lua file twice!

Hi,

I’ve raised a bug: case 23446

On Android, config,lua file is loaded twice. Because of that, if you create some globals in config.lua [for example: you load settings used in the application table], the second time it is run, it will not require libs, because they were already loaded.

In my case, at the top of the config.lua I’m creating a global table, under which I hold functions I use in lots of places. Thanks to that, I only have to create a single local variable in modules/other places to access all of the functions.

Anyway, this works fine on iOS, and used to work fine on Android. Now, it’s broken.

Thanks,

Krystian

Workaround:

if you are in a similar situation, you can work around this issue by changing your declaration from something like:

MYGLOBAL = {}

to:

MYGLOBAL = MYGLOBAL or {}

Workaround:

if you are in a similar situation, you can work around this issue by changing your declaration from something like:

MYGLOBAL = {}

to:

MYGLOBAL = MYGLOBAL or {}