Connect IQ 2.1.2 SDK Available!

The v2.1.2 release of the Connect IQ SDK is now available!

You can get it one of two ways:

  • Use the Connect IQ SDK Manager in Eclipse, by clicking the Connect IQ menu, selecting Open SDK Manager, and then clicking the Download button for Connect IQ SDK v2.1.2 released August 9, 2016.
  • Download directly from our developer site at http://developer.garmin.com/connect-iq/sdk/


There are all sorts of new features available in this release of the SDK, many of which are highlighted here: http://developer.garmin.com/index.php/blog/post/connect-iq-2-the-biker-has-arrived. View the README included with the SDK for a full set of release notes!
  • Duplicate

    Hi,

    From eclipse manager appears duplicate the same version, which is the correct?

    a greeting
  • Hi,

    From eclipse manager appears duplicate the same version, which is the correct?

    a greeting


    I only see one 2.1.2 version listed in my sdk manager. There is a 2.1.1 on the same date, but there should be no duplicate of the version.
  • Issue in SDK\connectiq-sdk-win-2.1.2\samples\Analog\source\AnalogGoalView.mc

    //! Load the resources required for the watch face
    function onLayout() {
    ... do some stuff here
    }

    causes crash at launch in CIQ 1.3 devices.
    In sumulator you see doubtful message:
    Failed invoking <symbol>
    Too Many Arguments Error
    in onLayout

    In device you see CIQ_LOG.txt
    ERROR: Too Many Arguments Error
    DETAILS:
    STORE_ID: (your app id)
    CALLSTACK:
    @PC = 0x00000000


    Example must be corrected to:
    function onLayout(dc) {
    ... do some stuff here
    }


    Compiler must be corrected to handle improper arguments usage
    Compiler messages must be corrected to match what is going on. (too few)
    Messages in devices must be corrected as above.
  • We added argument checking in 2.1.2 to make sure the correct number of arguments are being passed to functions. The most common place you'll see this is in onStart() and onStop(), which take a 'state' argument that was never explicitly required. With this change, the compiler will error if the arguments are missing. Technically, the error message is correct (for reasons I won't get into here), but I think we can probably clarify the error text to make it a little easier to identify the actual problem.

    I'm going to add an FAQ entry about this because I think it's something a lot of people will encounter for a while.
  • Technically, the error message is correct (for reasons I won't get into here)

    Agreed, but I'm happy to approach the subject for you.

    Arguments are the things that are passed to functions when calling them, and parameters are the things that the function is declared/defined.

    In this case, the function in question is defined to take zero parameters, like this...

    class MyView
    {
    function onLayout() {
    // stuff
    }
    }


    The system is invoking the function with one argument, like this...

    currentView.onLayout(dc);


    So, when the error message says Too Many Arguments Error, it makes sense. The number of arguments being passed is more than the number of arguments expected. That said, I agree that is confusing because that it says the error is in onLayout. I'm pretty sure the the first line of the error is just the exception string, and the next is the stack at the site where the error was recognized. A simple change to the exception string could make this easier for developers to understand.
  • Former Member
    Former Member over 9 years ago
    BUILD: ERROR: You must provide a private key when compiling ...?

    Just upgraded from SDK 1.2.11 to SDK 2.1.2 and get the following error when i go to compile my (previously fine) data field:

    BUILD: /Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/bin/java -Dfile.encoding=UTF-8 -Dapple.awt.UIElement=true -jar /Users/dcroton/Applications/connectiq/connectiq-sdk-mac-2.1.2/bin/monkeybrains.jar -a /Users/dcroton/Applications/connectiq/connectiq-sdk-mac-2.1.2/bin/api.db -i /Users/dcroton/Applications/connectiq/connectiq-sdk-mac-2.1.2/bin/api.debug.xml -o /Users/dcroton/Documents/Eclipse/DualFieldTop/bin/DualFieldTop.prg -z /Users/dcroton/Documents/Eclipse/DualFieldTop/resources/drawables/drawables.xml:/Users/dcroton/Documents/Eclipse/DualFieldTop/resources/resources.xml:/Users/dcroton/Documents/Eclipse/DualFieldTop/resources/strings/strings.xml -m /Users/dcroton/Documents/Eclipse/DualFieldTop/manifest.xml -u /Users/dcroton/Applications/connectiq/connectiq-sdk-mac-2.1.2/bin/devices.xml -p /Users/dcroton/Applications/connectiq/connectiq-sdk-mac-2.1.2/bin/projectInfo.xml /Users/dcroton/Documents/Eclipse/DualFieldTop/source/DualFieldTopView.mc /Users/dcroton/Documents/Eclipse/DualFieldTop/source/DualFieldTopApp.mc -d fr735xt_sim
    BUILD: ERROR: You must provide a private key when compiling.
    ...

    Any suggestions? As far as i know i have the latest version of Java etc.
  • Just upgraded from SDK 1.2.11 to SDK 2.1.2 and get the following error when i go to compile my (previously fine) data field:

    BUILD: /Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/bin/java -Dfile.encoding=UTF-8 -Dapple.awt.UIElement=true -jar /Users/dcroton/Applications/connectiq/connectiq-sdk-mac-2.1.2/bin/monkeybrains.jar -a /Users/dcroton/Applications/connectiq/connectiq-sdk-mac-2.1.2/bin/api.db -i /Users/dcroton/Applications/connectiq/connectiq-sdk-mac-2.1.2/bin/api.debug.xml -o /Users/dcroton/Documents/Eclipse/DualFieldTop/bin/DualFieldTop.prg -z /Users/dcroton/Documents/Eclipse/DualFieldTop/resources/drawables/drawables.xml:/Users/dcroton/Documents/Eclipse/DualFieldTop/resources/resources.xml:/Users/dcroton/Documents/Eclipse/DualFieldTop/resources/strings/strings.xml -m /Users/dcroton/Documents/Eclipse/DualFieldTop/manifest.xml -u /Users/dcroton/Applications/connectiq/connectiq-sdk-mac-2.1.2/bin/devices.xml -p /Users/dcroton/Applications/connectiq/connectiq-sdk-mac-2.1.2/bin/projectInfo.xml /Users/dcroton/Documents/Eclipse/DualFieldTop/source/DualFieldTopView.mc /Users/dcroton/Documents/Eclipse/DualFieldTop/source/DualFieldTopApp.mc -d fr735xt_sim
    BUILD: ERROR: You must provide a private key when compiling.
    ...

    Any suggestions? As far as i know i have the latest version of Java etc.


    You'll want to catch up on app signing: https://forums.garmin.com/showthread.php?354407-App-Signing-and-Security. Make sure to also read the linked blog post, that should get you up and running.
  • Former Member
    Former Member over 9 years ago
    You'll want to catch up on app signing: https://forums.garmin.com/showthread.php?354407-App-Signing-and-Security. Make sure to also read the linked blog post, that should get you up and running.


    Thanks. That seemed to do the trick.

    [UPDATE: Compiled, but the new SDK has screwed up how they behave and none of my fields are now selectable on my watch. See here
  • Former Member
    Former Member over 9 years ago
    We added argument checking in 2.1.2 to make sure the correct number of arguments are being passed to functions. The most common place you'll see this is in onStart() and onStop(), which take a 'state' argument that was never explicitly required. With this change, the compiler will error if the arguments are missing. Technically, the error message is correct (for reasons I won't get into here), but I think we can probably clarify the error text to make it a little easier to identify the actual problem.

    I'm going to add an FAQ entry about this because I think it's something a lot of people will encounter for a while.


    I know I am .. and I just will not use this version, at least until there is better information as to where the issue is so I can fix it. I don't use onStart or onStop .. so not there.
  • I don't use onStart or onStop .. so not there.


    Actually you do have them. In your app class you'll see it as something like:


    class MyWatchApp extends App.AppBase {
    function initialize() {
    AppBase.initialize();
    }

    //! onStart() is called on application start up
    function onStart(state) {
    }

    //! onStop() is called when your application is exiting
    function onStop(state) {
    }