Problems upgrading SDK

Hi,
I was going to try SDK 4.2.1, but my app crashes (a lot) and I've fear, so I tried to rollback to SDK 4.1.5 (latest used version) and now I cannot compile to launch the simulator:
"Device 'venu2' requires an SDK version of 4.2.0 or greater to be compiled. The current SDK version is 4.1.5. Please update your SDK using the Connect IQ SDK Manager."

What can I do? try to solve error by error or how can I solve this to keep in my older version?

Thanks in advance

  • Starting with the 4.1.6 SDK, type checking was on by default.  Try turning off type checking for you app by adding

    project.typecheck=0

    to your monkey.jungle.

    Then you can look at adding type checking.

  • Thank you, Jim.

    My monkey.jungle look pretty simple:

    project.manifest = manifest.xml
    But when I include your line, it crashes:
    project.manifest = manifest.xml
    project.typecheck=0
    ERROR: unknown:0: A valid 'project.manifest' property was not defined within a jungle file.
    I don't know what I'm doing wrong....
  • no, with 4.1.5. I will try with 4.2.1....

  • On 4.2.1 SDK....

    ERROR: epix2: C:\Users\ddani\Documents\WORK\garmin\riversurf\first_try\source\RiversurfApp.mc:17: Cannot resolve type 'Dictionary'.
    ERROR: epix2: C:\Users\ddani\Documents\WORK\garmin\riversurf\first_try\source\RiversurfApp.mc:21: Cannot resolve type 'Dictionary'.
    ERROR: epix2: C:\Users\ddani\Documents\WORK\garmin\riversurf\first_try\source\RiversurfApp.mc:25: Cannot resolve type 'Array'.
    ERROR: epix2: C:\Users\ddani\Documents\WORK\garmin\riversurf\first_try\source\RiversurfApp.mc:25: Cannot resolve type 'Views'.
    ERROR: epix2: C:\Users\ddani\Documents\WORK\garmin\riversurf\first_try\source\RiversurfApp.mc:25: Cannot resolve type 'InputDelegates'.
    ERROR: epix2: C:\Users\ddani\Documents\WORK\garmin\riversurf\first_try\source\RiversurfApp.mc:25: Container key / value types can only be applied to $.Toybox.Lang.Array or $.Toybox.Lang.Dictionary types.
    ERROR: epix2: C:\Users\ddani\Documents\WORK\garmin\riversurf\first_try\source\RiversurfApp.mc:26,8: Cannot resolve type 'Array'.
    ERROR: epix2: C:\Users\ddani\Documents\WORK\garmin\riversurf\first_try\source\RiversurfApp.mc:26,8: Cannot resolve type 'Views'.
    ERROR: epix2: C:\Users\ddani\Documents\WORK\garmin\riversurf\first_try\source\RiversurfApp.mc:26,8: Cannot resolve type 'InputDelegates'.
    ERROR: epix2: C:\Users\ddani\Documents\WORK\garmin\riversurf\first_try\source\RiversurfApp.mc:26,8: Container key / value types can only be applied to $.Toybox.Lang.Array or $.Toybox.Lang.Dictionary types.
    ERROR: epix2: C:\Users\ddani\Documents\WORK\garmin\riversurf\first_try\source\RiversurfSponsorsView.mc:16: Cannot resolve type 'Dc'.
    ERROR: epix2: C:\Users\ddani\Documents\WORK\garmin\riversurf\first_try\source\RiversurfSponsorsView.mc:21: Cannot resolve type 'Dc'.
    ERROR: epix2: C:\Users\ddani\Documents\WORK\garmin\riversurf\first_try\source\RiversurfView.mc:82: Cannot resolve type 'Dc'.    
    ERROR: epix2: C:\Users\ddani\Documents\WORK\garmin\riversurf\first_try\source\RiversurfView.mc:98: Cannot resolve type 'Dc'.

    Now my app is full of errors....

  • Reading 

    https://forums.garmin.com/developer/connect-iq/b/news-announcements/posts/the-road-to-strict-typing-is-paved-with-good-intentions

    I figured out the problem is type checking, but when I change between types, nothing happens. Always same errors and cannot compile my project... I don't understand what I'm doing wrong..

    Any help would be appreciate

  • Hi :

    Chaning from:

    using Toybox.Lang;

    to:

    import Toybox.Lang;

    could resolve the following build error:

    ERROR: epix2: C:\Users\ddani\Documents\WORK\garmin\riversurf\first_try\source\RiversurfApp.mc:17: Cannot resolve type 'Dictionary'.

    Other errors are the same.

  • Thank you, yp. Yes, it works, but now I've errors on

    function onLayout(dc as Dc) as Void {

    throws:

    Cannot resolve type 'Dc'

    Also with "import" instead "using"...

    And type check levels still make no sense for me (I'm sure something doing wrong...)

  • I think importing Graphics instead using solve the problem.... Thanks for your help!

  • Hello Danielsan,

    Can you help me with that problem " Cannot resolve type 'Dc'."   i try with import and not work. Thanks