Black screen after Corona splash screen

Hello. I made a game with Corona SDK 2017.3.31 and in simulator\real device everything is fine. But when I publish it in Google Play Market and install game from there I have only Corona splash screen and then just black screen. What can cause this problem? Thanks.

The Corona simulator is only an approximation of the device’s screen. You are still running on a much more powerful Mac or Windows machine with greater resources. You are on an operating system with different file name rules that either Android or iOS have. Many plugins are device only because the SDK’s they depend on are mobile only.

You should always test on a device before publishing to the public. You can tether your device to your computer via the USB cable and  use various tools to look at the device’s console log looking for errors.

However, the most likely cause of this problem is a file name issue.  Windows and macOS are not case sensitive. Android and iOS are. So if you have an image named:

Player.png

and in your code you try to open the file  

pic = display.newImage(“player.png”) 

Then it will fail since player.png and Player.png are different but Windows and macOS don’t care so the simulator is nice and happy but the devices crash.  Your console window that shows behind the simulator should be providing a warning about filename mismatches.

Rob

Thank you for fast reply. The problem is that on real device, when I upload apk via usb, everything works fine. Problem occurs only after installation of the game from Play Market. The only plugin I use is googleAnalytics. I’ve double checked filenames.The only warning I see in emulator console is “WARNING: The ‘plugin.googleAnalytics’ library is not available on this platform.”. But as I understood it’s because game is running on emulator and on real device it’s not a problem.

Can it be caused by files in sub directories? Like I keep modules in different folders, so that I have code like this:

composer.gotoScene( "scenes.splash", options ) 

or

local controller = require( "controllers.menu" )

Also I have global variables for assets paths,like this:

backgroundsPath = "./assets/backgrounds/", backgrounds = {   menu = "menu.jpg",   rules = "game.png",   game = "game.png" },

so that I use it like this

local background = display.newImage( sceneGroup, app.backgroundsPath .. app.backgrounds.menu, true )

Could it be the problem? Thank you.

Side loading and downloading are essentially the same thing the APK is “copied” to device and then installed.

I would hook up your Android device via USB and run this command

adb logcat Corona:v \*:s

It should show you any errors you are getting

Thanks a lot! It helped. It seems that problem was in paths, I removed “./” symbols from paths variables and now it works fine.

The Corona simulator is only an approximation of the device’s screen. You are still running on a much more powerful Mac or Windows machine with greater resources. You are on an operating system with different file name rules that either Android or iOS have. Many plugins are device only because the SDK’s they depend on are mobile only.

You should always test on a device before publishing to the public. You can tether your device to your computer via the USB cable and  use various tools to look at the device’s console log looking for errors.

However, the most likely cause of this problem is a file name issue.  Windows and macOS are not case sensitive. Android and iOS are. So if you have an image named:

Player.png

and in your code you try to open the file  

pic = display.newImage(“player.png”) 

Then it will fail since player.png and Player.png are different but Windows and macOS don’t care so the simulator is nice and happy but the devices crash.  Your console window that shows behind the simulator should be providing a warning about filename mismatches.

Rob

Thank you for fast reply. The problem is that on real device, when I upload apk via usb, everything works fine. Problem occurs only after installation of the game from Play Market. The only plugin I use is googleAnalytics. I’ve double checked filenames.The only warning I see in emulator console is “WARNING: The ‘plugin.googleAnalytics’ library is not available on this platform.”. But as I understood it’s because game is running on emulator and on real device it’s not a problem.

Can it be caused by files in sub directories? Like I keep modules in different folders, so that I have code like this:

composer.gotoScene( "scenes.splash", options ) 

or

local controller = require( "controllers.menu" )

Also I have global variables for assets paths,like this:

backgroundsPath = "./assets/backgrounds/", backgrounds = {   menu = "menu.jpg",   rules = "game.png",   game = "game.png" },

so that I use it like this

local background = display.newImage( sceneGroup, app.backgroundsPath .. app.backgrounds.menu, true )

Could it be the problem? Thank you.

Side loading and downloading are essentially the same thing the APK is “copied” to device and then installed.

I would hook up your Android device via USB and run this command

adb logcat Corona:v \*:s

It should show you any errors you are getting

Thanks a lot! It helped. It seems that problem was in paths, I removed “./” symbols from paths variables and now it works fine.