Hi all, i have a app that run without errors in Corona Simulator but got Runtime Error when try to execute on my android phone,
Error:
Runtime Error
C:\Users…\menu.lua:31: attempt to index local ‘background’ (a nil value)
(… are subdirectories)
in my code:
30: local background = display.newImageRect(sceneGroup, “assets\menu\background.png”, 1000, 1000)
31: background.x = display.contentCenterX
32: background.y = display.contentCenterY
I think the problem is assets\menu\background.png, because if i change, with only background.png(anche move the file) the app works…
So the question is: are subdirectories allowed in android?
settings:
settings = { orientation = { -- Supported values for orientation: -- portrait, portraitUpsideDown, landscapeLeft, landscapeRight default = "landscapeRight", supported = { "landscapeRight", }, }, excludeFiles = { -- Include only the necessary icon files on each platform iphone = { "Icon-\*dpi.png", }, android = { "Icon.png", "Icon-Small-\*.png", "Icon\*@2x.png", }, }, -- -- iOS Section -- iphone = { plist = { UIStatusBarHidden = false, UIPrerenderedIcon = true, -- set to false for "shine" overlay --UIApplicationExitsOnSuspend = true, -- uncomment to quit app on suspend CFBundleIconFiles = { "Icon.png", "Icon@2x.png", "Icon-167.png", "Icon-60.png", "Icon-60@2x.png", "Icon-60@3x.png", "Icon-72.png", "Icon-72@2x.png", "Icon-76.png", "Icon-76@2x.png", "Icon-Small.png", "Icon-Small@2x.png", "Icon-Small@3x.png", "Icon-Small-40.png", "Icon-Small-40@2x.png", "Icon-Small-50.png", "Icon-Small-50@2x.png", }, }, }, -- -- Android Section -- android = { usesPermissions = { "android.permission.INTERNET", }, }, }