wheres my resources?

Ok so I built a simple app (it uses director class btw) and I have tested it in the simulator and my images show up perfect. But when I build it and test it on my physical device (Samsung Galaxy S GT-I9000) and it installs (btw I might not be installing it right, I do it like this: I copy the compiled .apk file to my phone which is connected through usb. I then go into the file manager and click the .apk file to install it, which does work too). So when I run it I get a black screen, the only way to quit it is to press the home button. If I launch it again (or resume it, same thing) it freezes my phone and I have to shut it off. Can anyone help me? I thought the resources were supposed to be packaged in the .apk too.

Also as a side question my game uses the accelerometer so I looked into the example and added the basic stuff like the runtime add event listener and the function to handle it. I have a initialize function to draw the things too which draw the player at a X and Y value. So my question here is, how can I make the player move with the x and y values? Because I know that x = x + event.xGravity probably wont work, right?

But the top question is the most important, so please help! :(

Your resources are packaged in the APK. There's some other strange issue here.

Which version of corona are you using? I remember Carlos said not to use any dailies after 525 for android, but the latest daily should now work.

Also do you use subdirectories to store your resources? This doesn't work very well on android. Its supposed to be fixed in the latest corona version, but there are some cases where it doesn't work.

Simplify your code to just display the main background image for your app just to test whats going on, and then put that image in the root of your project folder.

Hey, thanks for replying.

I was using a subdirectory for them, but after it crashed I tried without the subdirectory with the images in the same folder as the source files. It gave the exact same result :(

Well I think I will give it a bit more effort for know, but if anyone thinks they want to help me more, then here is the pastebin'd code:

(btw I am pretty new to lua, even though I know the basics of java so the code might not be the best formatted? or just may not be good in general but anyway...)

main.lua -- http://pastebin.com/kkPJkt2D
game.lua -- http://pastebin.com/3gz3vtg4
menu.lua -- http://pastebin.com/kpuZKtn0
ui.lua -- http://pastebin.com/atxkNiMZ

(menu.lua is never used, so there are probably errors in that file)

Obviously from the code, I use the director class (which I already mentioned too) so it is used, but I won't include it as it's not really necessary.

Which version of corona you using?

Oh sorry :)
The installer is CoronaSDK_2011.505

(I installed it yesterday so I'm pretty sure it's the newest version)

usual q

this is a 2.2 device on an ARMv7 chipset
no requires in subfolders - all lua files must be flat
all capitalization matches - Foo.png is not the same as filename 'foo.png" even if the simulator says so. devices enforce caps.

trust me, I said I knew java so I know things like that. Thats definitely not the problem.

views:1628 update:2011/10/8 8:54:25
corona forums © 2003-2011