Complete
over 3 years ago

Issue resolved.

call of loadResource crash the app for some CIQ 3.0 devices

Hi, 

D2 charlie or Descent MK1 can't run line

var runnerGreenIcon = Application.loadResource( Rez.Drawables.runner_green_icon ) 

at least in simulator. It throws 
Error: Symbol Not Found Error
Details: Could not find symbol 'loadResource'


which is I assume bug.

Parents Comment Children
  • "Now I realised it is duplicated in the API from 3.1.0 without old marked as obsolete. "

    FYI the reason WatchUi.loadResource() is duplicated in the API as Application.loadResource() is so that background services can use it. It's arguable whether the old function should be marked as obsolete in this case, especially since the docs for WatchUi.loadResource() have notes applying to CIQ API 4.0.0 and later, so it seems clear that Garmin is okay with CIQ >= 3.1.0 devices calling either version of the function.

    (Although it would be nice to see the following note in the API docs as well.)

    https://developer.garmin.com/connect-iq/core-topics/resources/

     0

    1. WatchUi wasn’t accessible by background services so we moved it.  Leftwards arrow with hook

  • WatchUi,loadResource has been around since 1.0.0 and is still available, but Application.loadResource is new (well, 3.1 so not brand news)

  • Rolling eyes Thanks Jim, I specifically checked min sdk, but failed to do it properly and though it is from API Level 1.0.0... Now I realised it is duplicated in the API from 3.1.0 without old marked as obsolete. 

    So, not a bug. At least the one initially reported.