Debugging on an Android Device

Hello, I’ve installed all the SDK tools, adb tools, tethered my device, etc. I get my app through dropbox which is an .apk file (I built) that I download and after install through the normal apk android installer. When I load the app, it brings up the starting screen which has a New Game button that enters into my main program. When I press the new game button I hear the audio but after that is a black screen still it shuts down app by itself. The app works perfectly fine in the simulator, I do have some different libraries I am using like a FPS, etc.

I’ve made sure to install the 32 bit Java SE development kit 6, I have tried to gather all the info to figure out how to solve this. I made sure to double check all my file paths for images (made sure to follow Camel Case and no wrong input), I even brought them all out to the root directory, I made sure to check all my images (biggest image is 256x1450), made sure to check on the command line that all my images etc all have .png and not .PNG.

I tried to debug this through the windows command line adb, whenever I use adb logcat Corona:V *:s, it shows that I loaded the app, but when I click the new game button and enter main program it doesn’t show any errors and prints nothing till it crashes which still does nothing on command line. I tried to do adb logcat but there is too much information to follow and I couldn’t find anything related to my app.

Only thing that caught my eye was E/Launcher ( 966): Error finding settings, default accessibility to not found: accessibility_enabled

under all adb info, couldn’t find any other real info.

Any other way I can see corona errors? because adb logcat Corona:V *:s isn’t giving back any errors on this black screen,

I deleted everything till I could get the app to launch some basic Tiled map, it works perfectly fine and launches if I delete the 4 physics lines in between the lines below, but if I leave those 4 lines in I get a black screen with no errors. Any reason why this is happening and how to fix it?

It works perfectly fine both scenario’s on the simulator but when I debug it on my android Samsung S3 phone only works if I delete those 4 lines. This is my entire game program that I built for .apk (also has main menu’s that work perfectly fine no matter what).

display.setDefault(“minTextureFilter”, “nearest”)display.setDefault(“magTextureFilter”, “nearest”)

local physics = require(“physics”)
local dusk = require(“Dusk.Dusk”)
dusk.detectMapPath = true

---------------If I remove these 4 lines everything launches fine------------------------

–physics.setDrawMode(“hybrid”) --Set physics Draw mode
physics.setDrawMode(“normal”) --Set physics Draw mode
physics.setGravity( 0, 0 ) – overhead view, therefore no gravity vector
physics.start()

gui = display.newGroup()
gui.front = display.newGroup()
gui.middle = display.newGroup()
gui.back = display.newGroup()

gui:insert(gui.back)
gui:insert(gui.middle)
gui:insert(gui.front)

village = dusk.buildMap(“village.json”)
village.x = 0
village.y = 0
gui.back:insert(village)

Hi Azmar,

I had the same problem when I started out with Corona. Probably it’s because physics.start() needs to be the first function to be called.

I added it as a suggestion that it should throw an error but apparently it doesn’t.

http://forums.coronalabs.com/topic/38429-suggestions-throw-an-error-if-physicsstart-isnt-first/

Best regards,

Tomas

Wow thank you very much for this information! I couldn’t find it anywhere and I +1 your thread about Corona should 100% give back some error code, without having to waste days to figure it out.

I deleted everything till I could get the app to launch some basic Tiled map, it works perfectly fine and launches if I delete the 4 physics lines in between the lines below, but if I leave those 4 lines in I get a black screen with no errors. Any reason why this is happening and how to fix it?

It works perfectly fine both scenario’s on the simulator but when I debug it on my android Samsung S3 phone only works if I delete those 4 lines. This is my entire game program that I built for .apk (also has main menu’s that work perfectly fine no matter what).

display.setDefault(“minTextureFilter”, “nearest”)display.setDefault(“magTextureFilter”, “nearest”)

local physics = require(“physics”)
local dusk = require(“Dusk.Dusk”)
dusk.detectMapPath = true

---------------If I remove these 4 lines everything launches fine------------------------

–physics.setDrawMode(“hybrid”) --Set physics Draw mode
physics.setDrawMode(“normal”) --Set physics Draw mode
physics.setGravity( 0, 0 ) – overhead view, therefore no gravity vector
physics.start()

gui = display.newGroup()
gui.front = display.newGroup()
gui.middle = display.newGroup()
gui.back = display.newGroup()

gui:insert(gui.back)
gui:insert(gui.middle)
gui:insert(gui.front)

village = dusk.buildMap(“village.json”)
village.x = 0
village.y = 0
gui.back:insert(village)

Hi Azmar,

I had the same problem when I started out with Corona. Probably it’s because physics.start() needs to be the first function to be called.

I added it as a suggestion that it should throw an error but apparently it doesn’t.

http://forums.coronalabs.com/topic/38429-suggestions-throw-an-error-if-physicsstart-isnt-first/

Best regards,

Tomas

Wow thank you very much for this information! I couldn’t find it anywhere and I +1 your thread about Corona should 100% give back some error code, without having to waste days to figure it out.