Cannot display Animation on Android Devices in Corona SDK

Hi all,

I am having a difficulties with Sprite Sheet issue.Animation (Sprite sheet) cannot display on Android Devices but it can show on iOS devices and corona simulator.The following are some code portion that faced issue.

function displayCorrectAnimation ()                                 gameCount = gameCount + 1                                 paInstance1.isVisible = false                                 paInstance2.isVisible = false                                 paInstance3.isVisible = false                                 centreInstance.isVisible = false                                 --correctSound = audio.loadStream( CentreImageAudioPath..soundExt )                                 correctSoundChannel = audio.play( correctSound, { channel= 2, loops=0}  )                                                                                           local options = {                                width = correctImageWidth,                                height = correctImageHeight,                                numFrames = frames                             }                             cSheet= graphics.newImageSheet( CorrectImagePath, options )                                                          local sequenceData = {                                                            { name = "correct",                                   start = 1,                                   count = frames,                                   time = 1000,                                   loopCount = 1,                                 loopDirection = "forward"                                 }                                                            }                                                          cInstance = display.newSprite( cSheet, sequenceData )                                    cInstance.x = displayOffsetX(512 ,offsetx)                             cInstance.y = displayOffsetY(455,offsety1,offsety2)                                                          cInstance:play()                             screenGroup:insert(cInstance)                                                          if liveCount == 0 then                                                                  local function listener( event )                                     local options =                                         {                                            params=                                            {                                                Scene ="SF1"                                            }                                                                                  }                                             storyboard.gotoScene( "excellentAnswer", options  )                                 end                                                                  timer.performWithDelay( 3000, listener )                         elseif liveCount == 1 then                                   liveCount = 0                              local function listener( event )                                     local options =                                         {                                          params=                                            {                                                Scene ="SF1"                                            }                                                                                  }                                             storyboard.gotoScene( "goodAnswer", options  )                             end                                                                  timer.performWithDelay( 3000, listener )                                                  elseif liveCount == 2 then                             liveCount = 0                                                       local function listener( event )                                     local options =                                         {                                         params=                                            {                                                Scene ="SF1"                                            }                                                                                  }                                             storyboard.gotoScene( "moderateAnswer", options  )                             end                                                                  timer.performWithDelay( 3000, listener )                                                                                                    end             end

Hi @apple_id7,

In order for us to help (staff or fellow developers), we’re going to need considerably more information. There are too many “unknowns” here. What is the size of your image sheet? What device are you testing on? Do you receive any other errors in the console or log? Why are you not initially declaring (what appears to be) many global variables?

Please attempt to debug this code a bit more, and isolate slightly better where the specific issue is coming from.

Thanks,

Brent

Hi @apple_id7,

In order for us to help (staff or fellow developers), we’re going to need considerably more information. There are too many “unknowns” here. What is the size of your image sheet? What device are you testing on? Do you receive any other errors in the console or log? Why are you not initially declaring (what appears to be) many global variables?

Please attempt to debug this code a bit more, and isolate slightly better where the specific issue is coming from.

Thanks,

Brent