my app doesnt star

hello my friends i have an issue with an app that i made the other day (i just copied the code from a youtube video), but when i build it for android it doesnt start i saved it on my samsung galaxy tab, i installed and when i open it doesnt start, the screen goes black and show some info but it doesnt run at all.

my app is a game where you have to pop up som bubbles, but the bubbles doesnt show up but in the simulator i dont have any errors

You say it “show some info”.  What info exactly?  Can you upload your project somewhere?  You do not really give enough information here for us to help you.

https://drive.google.com/folderview?id=0B6SJN1EIY4cqNmRFbFdYZU85UUU&usp=sharing

i cant upload my rar file so i uploaded to my cloud

Here you go dude, didn’t work in my simulator at all:

-- pantalla de status display.setStatusBar(display.HiddenStatusBar); function main() showTitleScreen(); end --Mostrar Menu de titulo function showTitleScreen() --colocar todo el titulo de pantalla en un grupo de elemento tittleScreenGroup = display.newGroup(); --Display background image tittleScreen = display.newImage("imagenes/titulo.png", 0, 0, true); tittleScreen.x = \_W; tittleScreen.y = \_H; -- Mostrar los botones en imagenes playBtn = display.newImage("imagenes/playButton.png"); playBtn.x = \_W; playBtn.y = \_H + 50; playBtn.name = "playbutton"; -- insertar fondo y botones en el grupo titleScreenGroup:insert(titleScreen); titleScreenGroup:insert(playBtn); -- hacer el boton interactivo playBtn:addEventListener("tap", loadGame); end -- constantes \_H = display.contentHeight; \_W = display.contentWidth; mRand = math.random; o = 0; time\_remain = 10; time\_up = false; total\_orbs = 20; ready = false; -- sonido de carga que seran reproducidos local soundtrack = audio.loadStream("sonido/soundtrack.caf"); local pop\_sound = audio.loadSound("sonido/pop.caf"); local win\_sound = audio.loadSound("sonido/win.caf"); local fail\_sound = audio.loadSound("sonido/fail.caf"); --Menu principal local titleScreenGroup; local titleScreen; local playBtn; --Cajas de texto agrupadas local textBoxGroup; local textBox; local conditionDisplay; local messageText; local display\_txt = display.newText("Wait", 0, 0, native.systemFont, 16\*2); display\_txt.xScale = .5; display\_txt.yScale = .5; display\_txt:setReferencePoint(display.BottomLeftReferencePoint); display\_txt.x = 20; display\_txt.y = \_H-20; local countdowntxt = display.newText(time\_remain, 0, 0, native.systemFont, 16\*2); countdowntxt.xScale = .5 countdowntxt.yScale = .5; countdowntxt:setReferencePoint(display.BottomRightReferencePoint); countdowntxt.x = \_W-20; countdowntxt.y = \_H-20; local function winlose(condition) if(condition == "win") then display\_txt.text = "WIN!!"; elseif(condition == "fail") then display\_txt.text = "FAIL!!"; end end local function trackOrbs(obj) obj:removeSelf(); o = o-1; if (time\_up ~= true) then --Si todas las esferas son removidas de la pantalla if(o == 0) then audio.play(win\_sound); timer.cancel(gametmr); winlose("win"); end end end local function countDown(e) if(time\_remain == 10)then ready = true; display\_txt.text = "Go!!"; --audio.play(soundtrack, {loops=-1}); end time\_remain = time\_remain -1; countdowntxt.text = time\_remain; if(time\_remain == 0)then time\_up = true; if(o ~= 0)then audio.play(fail\_sound); display\_txt.text = "FAIL!!"; ready = false; end end end local function spawnOrb() local orb = display.newImageRect("imagenes/Blue\_orb.png", 45, 45,45,45); orb:setReferencePoint(display.CenterReferencePoint); orb.x = math.random(50, \_W-50); orb.y = mRand(50, \_H-50); function orb:touch(e) if(ready == true) then if(time\_up ~= true) then if(e.phase == "ended") then --reproducir sonido audio.play(pop\_sound); -- quitar orbs trackOrbs(self); end end end return true;

I found:

  • function showTitleScreen() was spelt TittleScreen
  • orb:setReferencePoint(display,CenterReferencePoint); should be orb:setReferencePoint(display . CenterReferencePoint); (DOT not COMMA)
  • “imagenes/blue_orb.png” should be “imagenes/Blue_orb.png” 

If yours ran in the sim then More than likely the B missing from Blue orb was the cause.  The simulator doesn’t seem to care about this but your device WILL!!  Caused me many scratches of my head before.

Hope this helps  :wink:

Just noticed as well soundtrack needs to be Soundtrack (had my sound off)!

Maybe choose another tutorial…

hmmm so you say the Capital letter does matter on my device.

if in my simulator ran everything why in your it didnt?

Yes it Does matter!  try it.  Let me know.  No ideas why your app ran in the sim becuase mine crashed straight away.  Are you surte you uploaded the right version?

the minimus SDK shows is 2.2 for android and i have a gingerbread 2.3.3 but i can open my app but the game doesnt start

i didnt get you about

  • function showTitleScreen() was spelt TittleScreen

how should i type it?

well i guess the problem was the “Setreferencepoint” where the comma was, but when i run it on my device the sound goes off, but in the simulator is running

oh and by the way the sound was fixed but i forgot i muted my device sound LOL

Well glad you made some progress at least :slight_smile:

but i have one question, what if i want to loop or make another level, or a main menu, because when all the bubbles are gone and you win or lose, the game stops, and the music goes on, how can i add that to my program?

You say it “show some info”.  What info exactly?  Can you upload your project somewhere?  You do not really give enough information here for us to help you.

https://drive.google.com/folderview?id=0B6SJN1EIY4cqNmRFbFdYZU85UUU&usp=sharing

i cant upload my rar file so i uploaded to my cloud

Here you go dude, didn’t work in my simulator at all:

-- pantalla de status display.setStatusBar(display.HiddenStatusBar); function main() showTitleScreen(); end --Mostrar Menu de titulo function showTitleScreen() --colocar todo el titulo de pantalla en un grupo de elemento tittleScreenGroup = display.newGroup(); --Display background image tittleScreen = display.newImage("imagenes/titulo.png", 0, 0, true); tittleScreen.x = \_W; tittleScreen.y = \_H; -- Mostrar los botones en imagenes playBtn = display.newImage("imagenes/playButton.png"); playBtn.x = \_W; playBtn.y = \_H + 50; playBtn.name = "playbutton"; -- insertar fondo y botones en el grupo titleScreenGroup:insert(titleScreen); titleScreenGroup:insert(playBtn); -- hacer el boton interactivo playBtn:addEventListener("tap", loadGame); end -- constantes \_H = display.contentHeight; \_W = display.contentWidth; mRand = math.random; o = 0; time\_remain = 10; time\_up = false; total\_orbs = 20; ready = false; -- sonido de carga que seran reproducidos local soundtrack = audio.loadStream("sonido/soundtrack.caf"); local pop\_sound = audio.loadSound("sonido/pop.caf"); local win\_sound = audio.loadSound("sonido/win.caf"); local fail\_sound = audio.loadSound("sonido/fail.caf"); --Menu principal local titleScreenGroup; local titleScreen; local playBtn; --Cajas de texto agrupadas local textBoxGroup; local textBox; local conditionDisplay; local messageText; local display\_txt = display.newText("Wait", 0, 0, native.systemFont, 16\*2); display\_txt.xScale = .5; display\_txt.yScale = .5; display\_txt:setReferencePoint(display.BottomLeftReferencePoint); display\_txt.x = 20; display\_txt.y = \_H-20; local countdowntxt = display.newText(time\_remain, 0, 0, native.systemFont, 16\*2); countdowntxt.xScale = .5 countdowntxt.yScale = .5; countdowntxt:setReferencePoint(display.BottomRightReferencePoint); countdowntxt.x = \_W-20; countdowntxt.y = \_H-20; local function winlose(condition) if(condition == "win") then display\_txt.text = "WIN!!"; elseif(condition == "fail") then display\_txt.text = "FAIL!!"; end end local function trackOrbs(obj) obj:removeSelf(); o = o-1; if (time\_up ~= true) then --Si todas las esferas son removidas de la pantalla if(o == 0) then audio.play(win\_sound); timer.cancel(gametmr); winlose("win"); end end end local function countDown(e) if(time\_remain == 10)then ready = true; display\_txt.text = "Go!!"; --audio.play(soundtrack, {loops=-1}); end time\_remain = time\_remain -1; countdowntxt.text = time\_remain; if(time\_remain == 0)then time\_up = true; if(o ~= 0)then audio.play(fail\_sound); display\_txt.text = "FAIL!!"; ready = false; end end end local function spawnOrb() local orb = display.newImageRect("imagenes/Blue\_orb.png", 45, 45,45,45); orb:setReferencePoint(display.CenterReferencePoint); orb.x = math.random(50, \_W-50); orb.y = mRand(50, \_H-50); function orb:touch(e) if(ready == true) then if(time\_up ~= true) then if(e.phase == "ended") then --reproducir sonido audio.play(pop\_sound); -- quitar orbs trackOrbs(self); end end end return true;

I found:

  • function showTitleScreen() was spelt TittleScreen
  • orb:setReferencePoint(display,CenterReferencePoint); should be orb:setReferencePoint(display . CenterReferencePoint); (DOT not COMMA)
  • “imagenes/blue_orb.png” should be “imagenes/Blue_orb.png” 

If yours ran in the sim then More than likely the B missing from Blue orb was the cause.  The simulator doesn’t seem to care about this but your device WILL!!  Caused me many scratches of my head before.

Hope this helps  :wink:

Just noticed as well soundtrack needs to be Soundtrack (had my sound off)!

Maybe choose another tutorial…

hmmm so you say the Capital letter does matter on my device.

if in my simulator ran everything why in your it didnt?

Yes it Does matter!  try it.  Let me know.  No ideas why your app ran in the sim becuase mine crashed straight away.  Are you surte you uploaded the right version?

the minimus SDK shows is 2.2 for android and i have a gingerbread 2.3.3 but i can open my app but the game doesnt start

i didnt get you about

  • function showTitleScreen() was spelt TittleScreen

how should i type it?

well i guess the problem was the “Setreferencepoint” where the comma was, but when i run it on my device the sound goes off, but in the simulator is running

oh and by the way the sound was fixed but i forgot i muted my device sound LOL

Well glad you made some progress at least :slight_smile: