Built Application won't open on Android phone, but works fine on simulator! ? ? ?

I have been working on a simple runner/shooter game. The game works fine on the windows simulator and no errors appear on the console, but when I try to build the game to test on my android phone the game will close down on me. It just won’t open. I’m fairly new to corona and programming, please help!

I would recommend reading this Tutorial carefully:

http://coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/

It will help you find your answer.

Rob

Thanks for your response Rob, I tried doing debbuging on my code, but I just don’t see any errors. I spent time trying to find mistakes, I made sure my images have proper resolutions, my sound files are all working fine, the only thing I’m not too sure on is the structure of my code. I been trying to figure out if for example, functions have to go above or beneath certain variables, or the proper use of local and global variables. It’s a little challenging, but fun. Any other advices will be greatly appreciated, thanks.

Hi @geowah12,

Much of this applies to the rules of scope in Lua. It’s a bit tricky when you first start learning, but no fears, it will make sense very soon! The following video may help you understand this concept:

http://www.youtube.com/watch?v=2ATlcGP2zMY

Brent

Whenever we see “It works in the simulator but not on the device”, it’s 95% of the time a file name problem.  The devices are case sensitive where the simulators are not.  Then 4% of the time, it’s an error in your build.settings.  The last 1% is a weird device error, but there is always an error in your adb logcat that says what it is.

Rob,

Alright, so I reviewed my project folder and matched my file names to my code and made sure all letters are written in proper lower or upper case, I din’t configure anything on my build.settings file, so it shouldn’t be it. I downloaded the android sdk and looked at the adb logcat messages, but no errors show up still. I’m still stuck with this.

Thanks.

Brent,

I took a look at the scope video and it answered a lot of my questions, thanks a lot. It really made me grasp the concept of function calling and variable types.   

What version of Corona SDK are you using?

I have version: Starter  v2014.2189.

Thanks.

Can you build the Hello World sample app and install it and see if that works?

I would recommend reading this Tutorial carefully:

http://coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/

It will help you find your answer.

Rob

Thanks for your response Rob, I tried doing debbuging on my code, but I just don’t see any errors. I spent time trying to find mistakes, I made sure my images have proper resolutions, my sound files are all working fine, the only thing I’m not too sure on is the structure of my code. I been trying to figure out if for example, functions have to go above or beneath certain variables, or the proper use of local and global variables. It’s a little challenging, but fun. Any other advices will be greatly appreciated, thanks.

Hi @geowah12,

Much of this applies to the rules of scope in Lua. It’s a bit tricky when you first start learning, but no fears, it will make sense very soon! The following video may help you understand this concept:

http://www.youtube.com/watch?v=2ATlcGP2zMY

Brent

Whenever we see “It works in the simulator but not on the device”, it’s 95% of the time a file name problem.  The devices are case sensitive where the simulators are not.  Then 4% of the time, it’s an error in your build.settings.  The last 1% is a weird device error, but there is always an error in your adb logcat that says what it is.

Rob,

Alright, so I reviewed my project folder and matched my file names to my code and made sure all letters are written in proper lower or upper case, I din’t configure anything on my build.settings file, so it shouldn’t be it. I downloaded the android sdk and looked at the adb logcat messages, but no errors show up still. I’m still stuck with this.

Thanks.

Brent,

I took a look at the scope video and it answered a lot of my questions, thanks a lot. It really made me grasp the concept of function calling and variable types.   

What version of Corona SDK are you using?

I have version: Starter  v2014.2189.

Thanks.

Can you build the Hello World sample app and install it and see if that works?