I believe previously you referenced that you were getting a black screen. Are you now receiving an error, or are you saying the black screen is your error?
Well, without the basic-ification of the app, there was a black screen then the app exited with the message:
“The application <name> has stopped unexpectedly. Please try again.”
With nothing in config.lua and build.settings and only the code above in main.lua, I still get the same message, the screen doesn’t even get dark, the message hits me immediately.
/BK
not sure if this helps at all but:
https://www.dropbox.com/s/5894svpcigxz8fk/Video%202013-11-27%2017%2010%2057.mov
Why:
./adb shell am start -n xxx.xxx.xxx/com.ansca.corona.CoronaActivity
??
Just type
adb logcat Corona:v \*:s
and that’s all
- adb is not used on mac you need to type ./adb
2) ./adb shell am start -n xxx.xxx.xxx/com.ansca.corona.CoronaActivity
where xxx.xxx.xxx is my app launches the app on device
3) adb logcat Corona:v *:s (you really need to use ./adb …. though)
what it does is, plots the following on terminal and NOTHING ELSE:
--------- beginning of /dev/log/system
--------- beginning of /dev/log/main
UPDATE:
I’ve tested another app and same issue on Android device (works fine in simulator) maybe it’s structure thing?
I have my main.lua in resourcedir, then a dir called scenes, in there I have loader.lua and also in the resourcedir I have “general” folder where I keep my general modules like database/file/other handlers.
Again works fine on simulator.
/BK
I read somewhere that corona apps do not run on ARMv6 processors and the phone I am testing on with ./adb install and logcat is http://en.wikipedia.org/wiki/LG_Optimus_One
it has Android version 2.3.3
the pad I am testing on is DMTECH Tablet 726H (Android v: Jelly Bean 4.1) with processor: Cortex-A9 CPU (1.0GHz)
Two other android devices get the same result (black screen only).
Something is not right.
I’ll test some basic apps (provided with the sdk) to see if any of those will run on my hardware.
/BK
Widget Demo worked on the tablet, failed on the phone, so I guess the phone is not good enough testing hardware even if android version is above 2.2.
playing with config and build.settings files now.
/BK
I believe the Optimise One is based on Armv6. Would be the most likely cause.
I am thinking one reason could be network.canDetectNetworkStatusChanges but I removed and tried without, same error.
The adb log makes no sense to me, something is failing to load but what?
I have checked the filenames so I know about the case-sensitive filename issue, it’s not it.
I doubt you’ll have much luck with Optimus One. Out of curiosity, have you tried a different image besides bg.png? I have ran into 2 “black screens of death” since 2.0 graphics. One was resolved by changing the image to a .jpg, might try that. Best.
remarking
Runtime:addEventListener( “location”, locationHandler ); – the gps eventhandler
prevented the app from cruhing, even if it had error handling.
This is awesome news.
I could ignore the gps or make a workaround.
Now I need to check how to read gps on android, if any different than normally.
/BK
I’m having the same issue on my app running on iPhone / iPad after moving my app to G2. Looking for a discussion on your findings pointing to the jpg change etc. Is there a thread on this? Thanks
@ksan I don’t have any threads going and still have not submitted my test case. It’s been hard to manage projects and get bug reports in right now. A lot of moving targets in G2, as I’m sure you’re aware.
I was in a rush to get my project out, so after having no luck trying other options, I tried the background image as a .jpg on a whim, and it worked! I moved on and have not had a chance to revisit, and more importantly have not had the issue since.
The strange thing is that all other items in the scene were “invisible” when the background was not loading. I could still tap on buttons, etc. After the .jpg change, all other items showed up as well.
Did you try changing any background or large image to .jpg? Are you having the same results on Android?
…
I just saw your other thread…I assume this is no longer as issue.
Cheers.
Thanks for the added info. Its most weird indeed. As you noticed my issue was nothing related it turned out. All is good on this end. Sorry for the thread hijacking.
Any update on this, I am having the same problem. Works great in simulator but when installed on my samsung galaxy android phone just brings up a blank screen.
I’m having the same issue.
my logcat shows:
V/Corona ( 5050): > Class.forName: network.LuaLoader
V/Corona ( 5050): < Class.forName: network.LuaLoader
V/Corona ( 5050): Loading via reflection: network.LuaLoader
I/Corona ( 5050): Platform: SM-T210 / ARM Neon / 4.1.2 / GC1000 core / OpenGL ES 2.0
V/Corona ( 5050): > Class.forName: CoronaProvider.licensing.google.LuaLoader
V/Corona ( 5050): < Class.forName: CoronaProvider.licensing.google.LuaLoader
V/Corona ( 5050): Loading via reflection: CoronaProvider.licensing.google.LuaLoader
I/Corona ( 5050): Runtime error
I/Corona ( 5050): ?:0: attempt to index a nil value
I/Corona ( 5050): stack traceback:
I/Corona ( 5050): ?: in function <?:24>
I/Corona ( 5050): ?: in function ‘dispatchEvent’
I/Corona ( 5050): ?: in function ‘gotoScene’
I/Corona ( 5050): ?: in main chunk
except I don’t have any issues in that area…The Create scene function is line 24. In the Main.lua I only use a GotoStatment. Works like a charm on IOS, but android is bugging me. <_<
Samsung Tab 3 7 inch
CoronaSDK 2014.2187 2014.02.27
[lua]local storyboard = require “storyboard”
local scene = storyboard.newScene()
local json = require(“json”)
local mime = require( “mime” )
local widget = require(“widget”)
require “sqlite3”
local connection = require(“testconnection”)
local ads = require “ads”
local scalex = display.contentScaleX
local scaley = display.contentScaleY
local _W = display.contentWidth
local _W_2 = _W/2
local _H = display.contentHeight
local _H_2 = _H/2
local error_text
– Called when the scene’s view does not exist:
function scene:createScene( event )
local localGroup = self.view
local background = display.newImageRect( “backgrass.pngt”,900,1425 )
background.x = _W_2
background.y = _H_2
localGroup:insert( background )
local backgroundF = display.newImageRect( “WCheader.pngt”,800,200 )
backgroundF.x = _W_2
backgroundF.y = 100
localGroup:insert( backgroundF)
local Hand = display.newImageRect( “hand.pngt”,256,256 )
Hand.x = _W_2
Hand.y = _H-320
localGroup:insert( Hand)
local handtext = display.newText(“To keep the app free, please click the ad!”, 0,0, native.systemFont, 32);
handtext.x = _W_2
handtext.y = _H-440
handtext:setFillColor(1)
localGroup:insert( handtext )
end
[/lua]
I’m having the same problem too… Corona should do something with the simulator! already wasted all day on debugging.
Any update on this, I am having the same problem. Works great in simulator but when installed on my samsung galaxy android phone just brings up a blank screen.
I’m having the same issue.
my logcat shows:
V/Corona ( 5050): > Class.forName: network.LuaLoader
V/Corona ( 5050): < Class.forName: network.LuaLoader
V/Corona ( 5050): Loading via reflection: network.LuaLoader
I/Corona ( 5050): Platform: SM-T210 / ARM Neon / 4.1.2 / GC1000 core / OpenGL ES 2.0
V/Corona ( 5050): > Class.forName: CoronaProvider.licensing.google.LuaLoader
V/Corona ( 5050): < Class.forName: CoronaProvider.licensing.google.LuaLoader
V/Corona ( 5050): Loading via reflection: CoronaProvider.licensing.google.LuaLoader
I/Corona ( 5050): Runtime error
I/Corona ( 5050): ?:0: attempt to index a nil value
I/Corona ( 5050): stack traceback:
I/Corona ( 5050): ?: in function <?:24>
I/Corona ( 5050): ?: in function ‘dispatchEvent’
I/Corona ( 5050): ?: in function ‘gotoScene’
I/Corona ( 5050): ?: in main chunk
except I don’t have any issues in that area…The Create scene function is line 24. In the Main.lua I only use a GotoStatment. Works like a charm on IOS, but android is bugging me. <_<
Samsung Tab 3 7 inch
CoronaSDK 2014.2187 2014.02.27
[lua]local storyboard = require “storyboard”
local scene = storyboard.newScene()
local json = require(“json”)
local mime = require( “mime” )
local widget = require(“widget”)
require “sqlite3”
local connection = require(“testconnection”)
local ads = require “ads”
local scalex = display.contentScaleX
local scaley = display.contentScaleY
local _W = display.contentWidth
local _W_2 = _W/2
local _H = display.contentHeight
local _H_2 = _H/2
local error_text
– Called when the scene’s view does not exist:
function scene:createScene( event )
local localGroup = self.view
local background = display.newImageRect( “backgrass.pngt”,900,1425 )
background.x = _W_2
background.y = _H_2
localGroup:insert( background )
local backgroundF = display.newImageRect( “WCheader.pngt”,800,200 )
backgroundF.x = _W_2
backgroundF.y = 100
localGroup:insert( backgroundF)
local Hand = display.newImageRect( “hand.pngt”,256,256 )
Hand.x = _W_2
Hand.y = _H-320
localGroup:insert( Hand)
local handtext = display.newText(“To keep the app free, please click the ad!”, 0,0, native.systemFont, 32);
handtext.x = _W_2
handtext.y = _H-440
handtext:setFillColor(1)
localGroup:insert( handtext )
end
[/lua]
I’m having the same problem too… Corona should do something with the simulator! already wasted all day on debugging.