How to run Build/app on Visual code with Connect IQ 4.0.5 ?

Hello,

I configured my VSCode as explained (here) and when I run "verify installation", I get => Monkey C: Installation verified.

Also I correctly configured Connect IQ via the sdkmanager on version 4.0.5 as current with somes watches and Edge).

But when I try running "Build device" I get the error "No devices available to build for testSuperApp. Download devices using the SDK Manager."

Edit : When I tried to run it on eclipse, the devices I picked seems to be not available :

So I guess, 4.0.5 isn't ready for those devices ?

Can someone please help me ?

Thanks

  • Ok, Thank you @jim_m_58 and @FlowState I'm able to build on eclipse for Venus with IQ 4.0.x.

    But : I'm still getting the same error on VScode. I can't build any device on it.

    Are you able to build anything device with >4.0.2 on VSCode ?

  • I've had zero problem doing so.  Make sure you have the min SDK/API lever set to something like 3.2 or below in the manifest.xml 

  • I got you but I'm still not able to build in VSCode.

    I made a video with the error.

    - I show that I have the SDK and the devices.

    - I show that the config in vscode is fine.

    - I create a project.

    - I try to build and get the error.

  • Your project doesn't have any products selected. The error message here could probably be improved.

    You have to set the products for your project as a separate step in VS Code, like the comments in manifest.xml say.

    CTRL-SHIFT-P > Monkey C: Edit Products

    I've posted about this before, but I wish Garmin would implement a more user-friendly way of creating/editing projects in VS Code, like using a WebView to implement complex settings, instead of asking devs to follow steps in manifest.xml comments. The example I gave in my post was VS Code's C++ project settings, which are implemented in a "property page" (webview) as opposed to being split up into a million different command palette entries.

  • My saver ! thank you so much ! it worked !

    Thank you all !

    ps: where can I find your post about this if possible ?

  • Also, just to be clear: as Jim alluded to, you don't need to set the min API to 4.0 just to use 4.0 features like Super Apps.

    For example, if you were to set the min API 3.2, you would be able to support API version >= 3.2, including 4.0.

    You would just have to use some tricks (such as has or exclude annotations) to make sure you don't accidentally try to use a 4.0 feature on a 3.2 device (which would cause a crash.)

    Most of my apps support almost every device except Epix, so I set the min CIQ version to 1.2 and use other means to prevent old devices from using new features.

  • In the case of widgets, you shouldn't even need "has" for supper apps.  If you build for a venu2/venu2s they are converted from widgets to device apps behind the scenes.

    As you said, you may need "has" for other 4.0 functionality.  For Garmin weather, not all devices with 3.2 support it, so an an example would be

    if(Toybox has :Weather) {....}