widget.newButton doesn't work on device

My game works fine in the simulator but shows an error on my phone.

The problem is with the button files not loading.

Here is my code:

    button1 = widget.newButton(
    {
        x=270,
        y=0,
        width = 200,
        height = 90,
        defaultFile = “buttons/buttonRed.png”,
        overFile = “buttons/buttonRedOVer.png”,
        label = “MSG”,
        fontSize = 60,
        emboss = true,
        labelColor = { default={ 1, 1, 1 }, over={ 1, 1, 1, 0.5 } },
    });
    button1:addEventListener( “tap”, onButtonShowPlayersTap )

    _group:insert( button1 );

this is the warning:

12:07:14.957  WARNING: case of filename ‘C:\Multitouch\buttons/buttonRedOVer.png’ differs on disk

How can I load the images?

It’s most likely an issue with case sensitive file names and you’ve input the wrong filename. A simulator wont crash if you write the filename as “buttonRedOVer.png” if the file’s actual name was “buttonRedOver.png”, but a device will.

So, make sure that you’ve written the filenames in your code exactly as they are in your project folder.

It’s most likely an issue with case sensitive file names and you’ve input the wrong filename. A simulator wont crash if you write the filename as “buttonRedOVer.png” if the file’s actual name was “buttonRedOver.png”, but a device will.

So, make sure that you’ve written the filenames in your code exactly as they are in your project folder.