I stripped the code down to bare minimum and still getting problems. I’ll include all of the code further below.
After further trial and error I got as far as the following:
- Uninstall the app and install it fresh from Google Play
- The app installs, I start it up and I get the first screen which asks for Storage (photos, media…etc) permissions. (screenshot below)
- Clicking Allow brings up the blank pink screen and does not load up the home lua file.
NOTE: The home lua file should load a single background image which should fill the screen.


build.settings
[lua]
settings =
{
orientation =
{
– Supported values for orientation:
– portrait, portraitUpsideDown, landscapeLeft, landscapeRight
default = “landscapeRight”,
supported = { “landscapeRight”, “landscapeLeft”, },
},
–
– Android section
–
android =
{
usesExpansionFile = true,
usesPermissions =
{
“android.permission.INTERNET”,
“com.android.vending.CHECK_LICENSE”,
“android.permission.WRITE_EXTERNAL_STORAGE”
},
},
–
– iOS section
–
iphone =
{
xcassets = “Images.xcassets”,
plist =
{
UIStatusBarHidden = false,
UILaunchStoryboardName = “LaunchScreen”,
},
},
–
– Plugins section
–
plugins =
{
},
–
– Project section
–
excludeFiles =
{
– Exclude unnecessary files for each platform
all = { “Icon.png”, “Icon-*dpi.png”, “Images.xcassets”, },
android = { “LaunchScreen.storyboardc”, },
},
}
[/lua]
config.lua
[lua]
application =
{
content =
{
--[[
imageSuffix =
{
["@2x"] = 2,
["@4x"] = 4,
},
--]]
},
license =
{
google =
{
key = “MIIBIjANBgkqhkiG9w0BAQEFAA… <I’ve entered my Licence key from the Play Console->Development Tools->Services & API’s page>… 6ahrCQIDAQAB”,
},
},
}
[/lua]
main.lua
[lua]
–
– main.lua
– hide the status bar
display.setStatusBar( display.HiddenStatusBar )
display.setDefault(“background”, 1, 0, 1)
– require the composer library
local composer = require “composer”
– Add any objects that should appear on all scenes below (e.g. tab bar, hud, etc)
– Add any system wide event handlers, location, key events, system resume/suspend, memory, etc.
– load scene1
composer.gotoScene( “home” )
[/lua]
home.lua
[lua]
-------------pan--------------------------------------------------------------------
– scene.lua
local composer = require( “composer” )
local scene = composer.newScene()
function scene:create( event )
local sceneGroup = self.view
background = display.newImageRect( “images/background.png”, system.ResourceDirectory, display.contentWidth, display.contentHeight )
background.x = display.contentCenterX
background.y = display.contentCenterY
if (background == nil) then
local function onComplete( event )
native.requestExit()
end
native.showAlert( “Unable to Access”, “Unable to Access files. Try restarting the Clarinet Player again.”, { “Close” }, onComplete)
else
native.showAlert( “X for Background”, "Background X is : " … background.x, { “Close” })
end
end
function scene:show( event )
local sceneGroup = self.view
local phase = event.phase
if phase == “will” then
– Called when the scene is still off screen and is about to move on screen
elseif phase == “did” then
– Called when the scene is now on screen
–
– INSERT code here to make the scene come alive
– e.g. start timers, begin animation, play audio, etc
– we obtain the object by id from the scene’s object hierarchy
end
end
function scene:hide( event )
local sceneGroup = self.view
local phase = event.phase
if event.phase == “will” then
– Called when the scene is on screen and is about to move off screen
–
– INSERT code here to pause the scene
– e.g. stop timers, stop animation, unload sounds, etc.)
elseif phase == “did” then
– Called when the scene is now off screen
end
end
function scene:destroy( event )
local sceneGroup = self.view
– Called prior to the removal of scene’s “view” (sceneGroup)
–
– INSERT code here to cleanup the scene
– e.g. remove display objects, remove touch listeners, save state, etc
end
– Listener setup
scene:addEventListener( “create”, scene )
scene:addEventListener( “show”, scene )
scene:addEventListener( “hide”, scene )
scene:addEventListener( “destroy”, scene )
return scene
[/lua]