Runtime Error

What OS are the devices running?

Rob

Android.

We’ve found the problem (Thanks Sergey and Perry!).

You have expansion files turned on in your build settings. For you to use that, you have to upload the apk and obb file to Google Play and then install it to your device from Google Play (as an Alpha or Beta).

But unless you need expansion files, I would turn this feature off.

Rob

That solves the problem, thank you.

I got same problem with another code:

local composer = require("composer") local scene = composer.newScene() function scene:create(event) local function downloadlistener() end network.download("https://lh3.googleusercontent.com/FfF38ylbEh2tyCAeOTVzbVhjdMmD6lpYhHn3-1jIcCN9VtLfCq2SzA4yaV6oSpx7\_ctvSIW1RrryeNwM0rwCzAbXvICJVWzHwLQYrp-uJf1va8f1pluJSE7Ri4KtRJnlbLkOQQYrbqQZZUL0su67tFP8Qc3v7ReEClEj793viOpwJvveJ7c3IGnaE9lJBtUlWoImcWufMJFaqoVyPauUK7ytW7VEVqXui-stlCDiynvHKw0DPrX2DjS7dbmiz3Fmq3AY3wboGqEAkz\_Q\_jflbJTvEowqTD3dmZGC9ORayTFT\_i5bzQCHk182AP9V9pu39znJ\_3-n9dBZIa5v1e5ekO9w\_JjglQ0dR\_MGrRpA2xxeaq-Z1ExzX-IVJWYasgYyx\_YdDaIjrJm2cV5oTeYrIA7yOooq3ET7SjfYEAMQWH80TAbY6gZzl0p2V-ut3RlYnpKESDuNlIahAgXMMEMMEPB6TUd5xt1Zs7GDw3523y92Pi27XKlY-H7mEGKnNdTmkADSsNhHLVvCsXhuRnPw4LYL40\_QCxtDgahpxIMXypAAXRG6S4DY6w5GdsBAynWiDHE9=w1725-h970-no","GET",downloadlistener,"animals1.jpg",system.TemporaryDirectory) local animals1 = display.newImageRect("animals1.jpg",system.TemporaryDirectory,display.contentWidth / 2,display.contentHeight / 2) animals1.x = (display.contentWidth / 2) / 2 animals1.y = (display.contentHeight / 2) / 2 network.download("https://lh3.googleusercontent.com/mXbSzSZHgA0TtGPQuHs67wisixJD88CVsa8Lv\_UZ7Zy9rEVd02Z3atERhrNnoT6pLy9-A8GoS3PV2s2U3VTjYV9Zupjp7s9Lr0w6U2bCtN-kGHwK5sGwILvzTxizZCs4Okz69sBIfnw6jHnX5pAHxGwyjkD0RjCOp6Owso5Iq65nqBUGolxVb-NF7mleLDw9s1yEXRNxjpMmAPaLDk3vbV1XnA7fxRIx11RnmDU9G7YcYzfADe5vBjfmYfwD0prbbfepVZMx2FA2HEwXV79WLwNYD\_CC9oNI0Mwv3GDYPOzJH5HxIDYoz\_R4oDlV5ONcKpEY7dNU-6fV7JknLRy87yeCZVxQdpgEs88vMC6B9UUx5yeaRvbLyOWiDkT8H7AbRns17Jp8RGIGYHsm-KUIOz\_k\_xhCQXHAnJYLvMmLPJDzq8qcaVlpOd-4mZTG0WCbqxsPBmpD7\_Y40DzbRc\_GzOHecqX7gx-OCKB5U21TRYZikFqCjeoQAyINySIbnUigmeJb6PyaHdWtkMoZ-0C0\_4klakRUQEBczLq\_hFq59-ZDizuKLwhIopVMr00ulXaU4gJL=w958-h539-no","GET",downloadlistener,"nature1.jpg",system.TemporaryDirectory) local nature1 = display.newImageRect("nature1.jpg",system.TemporaryDirectory,display.contentWidth / 2,display.contentHeight / 2) nature1.x = display.contentWidth - (display.contentWidth / 2) / 2 nature1.y = (display.contentHeight / 2) / 2 local function animalstaplistener() end animals1:addEventListener("tap",animalstaplistener) local function naturetaplistener() end nature1:addEventListener("tap",naturetaplistener) end function scene:destroy(event) display.remove(animals1) display.remove(nature1) end scene:addEventListener("create",scene) scene:addEventListener("destroy",scene) return scene

Runtime Error

C:\Users\rakva\Documents\Corona Projects\Jigsaw Puzzle\menu.lua:8: attempt to index local ‘animals1’ (a nil value)

On LG Leon with Android.

You can’t access the image until it has been downloaded, in this use case.

You should initialize the display object in the network download listener

Works fine now, thank you.