Using widget library in Enterprise

I am not quite sure what is happening here.  Even a creation of a simple button does not work when compile using Enterprise Android.  

    upButton = widget.newButton

    {

        label = “Up”, 

        fontSize = 48,

        top = 0,

        left = 0,

        onEvent = upButtonPressed,

    }

The very same code is working fine using Corona Pro to run.

Kindly advise.

What error are you seeing in this case?

Strangely the error I got has nothing to do with the button.  But everything works fine once I stop using the widget.newbutton.

06-03 08:39:12.105: V/Corona(7615): WARNING: Asset file “widget_theme_android.png” does not exist.

06-03 08:39:12.105: I/Corona(7615): Runtime error

06-03 08:39:12.105: I/Corona(7615): bad argument #2 to ‘newSprite’ (ImageSheet expected, got nil)

06-03 08:39:12.105: I/Corona(7615): stack traceback:

06-03 08:39:12.105: I/Corona(7615): [C]: in function ‘newSprite’

06-03 08:39:12.105: I/Corona(7615): ?: in function ‘?’

06-03 08:39:12.105: I/Corona(7615): ?: in function <?:1512>

06-03 08:39:12.105: I/Corona(7615): (tail call): ?

06-03 08:39:12.105: I/Corona(7615): ?: in function <?:122>

06-03 08:39:12.105: I/Corona(7615): (tail call): ?

06-03 08:39:12.105: I/Corona(7615): ?: in function <?:308>

06-03 08:39:12.105: I/Corona(7615): ?: in function ‘dispatchEvent’

06-03 08:39:12.105: I/Corona(7615): ?: in function ‘gotoScene’

06-03 08:39:12.105: I/Corona(7615): ?: in main chunk

The issue seems to be caused by the use of text button.  Image button is fine. 

Anyone from Corona Team looking into this?

Your error is that it cannot find the Widget theme files. Did you try running one of the enterprise sample apps?

Our enterprise projects use Widgets fine on Android and iOS. My suspicion is that you may have removed or are not including a file.

I cannot remember if a file is needed or not however since its been a while… Try one of the samples and see.

Thanks for enlightening me!  Apparently the “corona_asset_widget_theme_android.png” is required and I do not have them in my project.

What error are you seeing in this case?

Strangely the error I got has nothing to do with the button.  But everything works fine once I stop using the widget.newbutton.

06-03 08:39:12.105: V/Corona(7615): WARNING: Asset file “widget_theme_android.png” does not exist.

06-03 08:39:12.105: I/Corona(7615): Runtime error

06-03 08:39:12.105: I/Corona(7615): bad argument #2 to ‘newSprite’ (ImageSheet expected, got nil)

06-03 08:39:12.105: I/Corona(7615): stack traceback:

06-03 08:39:12.105: I/Corona(7615): [C]: in function ‘newSprite’

06-03 08:39:12.105: I/Corona(7615): ?: in function ‘?’

06-03 08:39:12.105: I/Corona(7615): ?: in function <?:1512>

06-03 08:39:12.105: I/Corona(7615): (tail call): ?

06-03 08:39:12.105: I/Corona(7615): ?: in function <?:122>

06-03 08:39:12.105: I/Corona(7615): (tail call): ?

06-03 08:39:12.105: I/Corona(7615): ?: in function <?:308>

06-03 08:39:12.105: I/Corona(7615): ?: in function ‘dispatchEvent’

06-03 08:39:12.105: I/Corona(7615): ?: in function ‘gotoScene’

06-03 08:39:12.105: I/Corona(7615): ?: in main chunk

The issue seems to be caused by the use of text button.  Image button is fine. 

Anyone from Corona Team looking into this?

Your error is that it cannot find the Widget theme files. Did you try running one of the enterprise sample apps?

Our enterprise projects use Widgets fine on Android and iOS. My suspicion is that you may have removed or are not including a file.

I cannot remember if a file is needed or not however since its been a while… Try one of the samples and see.

Thanks for enlightening me!  Apparently the “corona_asset_widget_theme_android.png” is required and I do not have them in my project.