2 times the same code, one works on device, other one produces black screen

Hey everybody,

yesterday I tried to code a little game. And after I was happy that I got the beginning right and it worked on my device I wanted to integrate storyboard to add a menu. But when I tested it on my device I got a black screen although everything worked fine on the emulator.

So I tried to isolate the problem by basically creating a new app with the same code just leaving out the game part focusing on the the storyboard based menu and what can I say it works on my device.

So now I am confused as the beginning of the app is the same code. Before any code of the game, which might cause any problems could interfer, and again on the emulator everything works fine. Also I used the debug mode of eclipse and only got green lights when I start the app although I only see a black screen it says:

Tag: Activity Manager

Text: Displayed mypackagename/com.ansca.corona.CoronaActivity: +307ms

So here is some of my code. As I copied and pasted the files.

main.lua

local storyboard = require("storyboard") local widget = require("widget") local centerX = display.contentCenterX local centerY = display.contentCenterY display.setStatusBar(display.HiddenStatusBar) display.setDefault( "background", 255,255,255 ) storyboard.gotoScene( "menu" )

I have created menu.lua based on the templates available for scenes here so here is some of the code just

displaying some buttons in the “createScene” part

--------------------------------------------------------------------------------- -- Settings -- Gane Settings --------------------------------------------------------------------------------- local storyboard = require( "storyboard" ) local widget = require("widget") local scene = storyboard.newScene() -- Clear previous scene storyboard.removeAll() -- local forward references should go here -- local centerX, centerY, \_W,\_H --------------------------------------------------------------------------------- -- BEGINNING OF YOUR IMPLEMENTATION --------------------------------------------------------------------------------- -- Called when the scene's view does not exist: function scene:createScene( event ) local group = self.view display.setStatusBar(display.HiddenStatusBar) display.setDefault( "background", 255,255,255 ) centerX = display.contentCenterX centerY = display.contentCenterY \_W = display.contentWidth \_H = display.contentHeight local function handleButtonEvent( event ) if ( "ended" == event.phase ) then if(event.target.id=="start")then storyboard.gotoScene( "game", {effect="crossFade", time=400}) end if(event.target.id=="settings")then storyboard.gotoScene( "settings", {effect="crossFade", time=400}) end end end local startGameBtn = widget.newButton { width = 400, height = 76, defaultFile = "buttons/start.png", overFile = "buttons/start.png", left = 0, top = 125, id = "start", onEvent = handleButtonEvent } local settingsBtn = widget.newButton { width = 400, height = 76, defaultFile = "buttons/settings.png", overFile = "buttons/settings.png", left = 0, top = (startGameBtn.y +50), id = "settings", onEvent = handleButtonEvent } local moreBtn = widget.newButton { width = 400, height = 76, defaultFile = "buttons/more.png", overFile = "buttons/more.png", left = 0, top = (settingsBtn.y +50), id = "more", onEvent = handleButtonEvent } startGameBtn.x=centerX settingsBtn.x=centerX moreBtn.x=centerX group:insert(startGameBtn) group:insert(settingsBtn) group:insert(moreBtn) end

Any ideas?

Thanks.