Hi folks,
Been scratching my head for a while with this so hoping someone can lend a hand. Till now I've been creating and testing my apps in Eclipse and this works well if a bit cumbersome. I'd like to be able to use Atom to write the code and launch the simulator via the command line but when trying to do this I'm facing no end of errors.
Workflow looks like this:
9:33:16 ------------------------------------------------------------ » connectiq 9:33:38 ------------------------------------------------------------ » monkeyc -o bin/app.prg -f monkey.jungle -y /path/to/dev/key -d fenix5splus -w
However, I am being shown the following error
ERROR: Provided device id 'fenix5splus' is invalid. com.garmin.monkeybrains.ParameterException: Provided device id 'fenix5splus' is invalid. at com.garmin.monkeybrains.Monkeybrains.run(Monkeybrains.java:2143) at com.garmin.monkeybrains.Monkeybrains.simpleMain(Monkeybrains.java:252) at com.garmin.monkeybrains.Monkeybrains.simpleMain(Monkeybrains.java:234) at com.garmin.monkeybrains.Monkeybrains.main(Monkeybrains.java:281) usage: monkeyc [-a <arg>] [-d <arg>] [-e] [--Eno-invalid-symbol] [-f <arg>] [-g] [-h] [-i <arg>] [-m <arg>] [-o <arg>] [-p <arg>] [-r] [-s <arg>] [-t] [-u <arg>] [-v] [-w] [-x <arg>] [-y <arg>] [-z <arg>] -a,--apidb <arg> API import file -d,--device <arg> Target device -e,--package-app Create an application package. --Eno-invalid-symbolDo not error when a symbol is found to be invalid -f,--jungles <arg> Jungle files -g,--debug Print debug output -h,--help Prints help information -i,--import-dbg <arg> Import api.debug.xml -m,--manifest <arg> Manifest file -o,--output <arg> Output file to create -p,--project-info <arg>projectInfo.xml file to use when compiling -r,--release Strip debug information -s,--sdk-version <arg> SDK version to target -t,--unit-test Enables compilation of unit tests -u,--devices <arg> devices.xml file to use when compiling -v,--version Prints the compiler version -w,--warn Show compiler warnings -x,--excludes <arg> Add annotations to the exclude list -y,--private-key <arg> Private key to sign builds with -z,--rez <arg> Resource file
I've tried other device id's to no avail.
Looking at my Eclipse console when the run command is executed I see:
BUILD: /Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/bin/java -Dfile.encoding=UTF-8 -Dapple.awt.UIElement=true -jar /Users/avdi/gitspace/connectiq/connectiq-sdk-mac-3.0.11-2019-4-30-cd45859/bin/monkeybrains.jar -o /Users/avdi/gitspace/garmin/watch-faces/app/bin/app.prg -w -y /path/to/dev/key -d fenix5splus_sim -s 3.0.0 -f /Users/avdi/gitspace/garmin/watch-faces/app/monkey.jungle
If I try to run the monkeyc command in a similar way on the command line I get the following errors
9:44:38 ------------------------------------------------------------ » monkeyc -o bin/app.prg -f monkey.jungle -y /path/to/dev/key -d fenix5splus -s 3.0.0 -w ERROR: Provided device id 'fenix5splus' is invalid. com.garmin.monkeybrains.ParameterException: Provided device id 'fenix5splus' is invalid. at com.garmin.monkeybrains.Monkeybrains.run(Monkeybrains.java:2143) at com.garmin.monkeybrains.Monkeybrains.simpleMain(Monkeybrains.java:252) at com.garmin.monkeybrains.Monkeybrains.simpleMain(Monkeybrains.java:234) at com.garmin.monkeybrains.Monkeybrains.main(Monkeybrains.java:281) usage: monkeyc [-a <arg>] [-d <arg>] [-e] [--Eno-invalid-symbol] [-f <arg>] [-g] [-h] [-i <arg>] [-m <arg>] [-o <arg>] [-p <arg>] [-r] [-s <arg>] [-t] [-u <arg>] [-v] [-w] [-x <arg>] [-y <arg>] [-z <arg>] -a,--apidb <arg> API import file -d,--device <arg> Target device -e,--package-app Create an application package. --Eno-invalid-symbolDo not error when a symbol is found to be invalid -f,--jungles <arg> Jungle files -g,--debug Print debug output -h,--help Prints help information -i,--import-dbg <arg> Import api.debug.xml -m,--manifest <arg> Manifest file -o,--output <arg> Output file to create -p,--project-info <arg>projectInfo.xml file to use when compiling -r,--release Strip debug information -s,--sdk-version <arg> SDK version to target -t,--unit-test Enables compilation of unit tests -u,--devices <arg> devices.xml file to use when compiling -v,--version Prints the compiler version -w,--warn Show compiler warnings -x,--excludes <arg> Add annotations to the exclude list -y,--private-key <arg> Private key to sign builds with -z,--rez <arg> Resource file 9:45:13 ------------------------------------------------------------ » monkeyc -o bin/app.prg -f monkey.jungle -y /path/to/dev/key -d fenix5splus_sim -s 3.0.0 -w ERROR: null java.lang.NullPointerException at com.garmin.monkeybrains.devices.SimDevice.<init>(SimDevice.java:12) at com.garmin.monkeybrains.Monkeybrains.run(Monkeybrains.java:2138) at com.garmin.monkeybrains.Monkeybrains.simpleMain(Monkeybrains.java:252) at com.garmin.monkeybrains.Monkeybrains.simpleMain(Monkeybrains.java:234) at com.garmin.monkeybrains.Monkeybrains.main(Monkeybrains.java:281) usage: monkeyc [-a <arg>] [-d <arg>] [-e] [--Eno-invalid-symbol] [-f <arg>] [-g] [-h] [-i <arg>] [-m <arg>] [-o <arg>] [-p <arg>] [-r] [-s <arg>] [-t] [-u <arg>] [-v] [-w] [-x <arg>] [-y <arg>] [-z <arg>] -a,--apidb <arg> API import file -d,--device <arg> Target device -e,--package-app Create an application package. --Eno-invalid-symbolDo not error when a symbol is found to be invalid -f,--jungles <arg> Jungle files -g,--debug Print debug output -h,--help Prints help information -i,--import-dbg <arg> Import api.debug.xml -m,--manifest <arg> Manifest file -o,--output <arg> Output file to create -p,--project-info <arg>projectInfo.xml file to use when compiling -r,--release Strip debug information -s,--sdk-version <arg> SDK version to target -t,--unit-test Enables compilation of unit tests -u,--devices <arg> devices.xml file to use when compiling -v,--version Prints the compiler version -w,--warn Show compiler warnings -x,--excludes <arg> Add annotations to the exclude list -y,--private-key <arg> Private key to sign builds with -z,--rez <arg> Resource file
I've also checked the monkeyc script that is executed to make sure it is not being pulled from somewhere else and it looks like I've correctly set up monkeyc in my path.
9:47:15 ------------------------------------------------------------ » which monkeyc /Users/avdi/gitspace/connectiq/bin/monkeyc 9:48:16 ------------------------------------------------------------ » cat `which monkeyc` #!/bin/bash MB_HOME="$( cd "$( dirname "$0" )" && pwd )" java -classpath "$MB_HOME"/monkeybrains.jar com.garmin.monkeybrains.Monkeybrains "$@"
Initially I thought that the device id being invalid might be an issue with the manifext but I don't think that's the case
9:49:36 ------------------------------------------------------------ » cat monkey.jungle project.manifest = manifest.xml 9:55:26 ------------------------------------------------------------ » cat manifest.xml <!-- This is a generated file. It is highly recommended that you DO NOT edit this file. --><iq:manifest xmlns:iq="http://www.garmin.com/xml/connectiq" version="3"> <iq:application entry="app" id="3e5f9f2298bb49deaa1b819ee9aa694f" launcherIcon="@Drawables.LauncherIcon" minSdkVersion="2.3.0" name="@Strings.AppName" type="watchface" version="2.6.1"> <iq:products> <iq:product id="approachs60"/> <iq:product id="d2charlie"/> <iq:product id="d2delta"/> <iq:product id="d2deltapx"/> <iq:product id="d2deltas"/> <iq:product id="fenix5"/> <iq:product id="fenix5plus"/> <iq:product id="fenix5splus"/> <iq:product id="fenix5x"/> <iq:product id="fenix5xplus"/> <iq:product id="fr245"/> <iq:product id="fr245m"/> <iq:product id="fr645"/> <iq:product id="fr645m"/> <iq:product id="fr935"/> <iq:product id="fr945"/> <iq:product id="marqathlete"/> <iq:product id="marqaviator"/> <iq:product id="marqcaptain"/> <iq:product id="marqdriver"/> <iq:product id="marqexpedition"/> <iq:product id="vivoactive3"/> <iq:product id="vivoactive3d"/> <iq:product id="vivoactive3m"/> <iq:product id="vivoactive3mlte"/> </iq:products> <iq:permissions> <iq:uses-permission id="UserProfile"/> </iq:permissions> <iq:languages> <iq:language>eng</iq:language> </iq:languages> <iq:barrels/> </iq:application> </iq:manifest>
All this is running on the latest MacOS, I don't have a Windows / Linux machine to test on I'm afraid so hoping its a case of user error.
Let me know if I can provide further debug information.