ANT permission problem

Hello,
after creating a few data fields, I've decided to try an app. But I'm not able to build sample MO2Display app. When open it in eclipse, nothing gets build. From a command line I get this:
C:\Source\connectiq-sdk-win-1.0.0\samples\MO2Display>C:\Source\connectiq-sdk-win-1.0.0\bin\monkeyc -o MO2Display.prg -m manifest.xml -z resources\resources.xml -d fr920xt source\*.mc
java.lang.NullPointerException
at com.garmin.monkeybrains.asm.SymbolTable.getEntry(SymbolTable.java:47)
at com.garmin.monkeybrains.asm.PermissionEntry.resolve(PermissionEntry.java:60)
at com.garmin.monkeybrains.asm.Assembler.resolve(Assembler.java:1012)
at com.garmin.monkeybrains.asm.Assembler.resolve(Assembler.java:814)
at com.garmin.monkeybrains.asm.Assembler.assemble(Assembler.java:542)
at com.garmin.monkeybrains.compiler.Compiler.assemble(Compiler.java:580)
at com.garmin.monkeybrains.Monkeybrains.main(Monkeybrains.java:296)
ERROR:Unknown:0: null

When I remove ANT permission, I can build it. With ANT permission back, the problem occurs. And when trying to run the app (without specified permission) of 920XT, it crashes (not able to find the symbol).
  • What am I doing wrong?
  • Isn't the simulator testing permissions?
  • When I restarted eclipse, I get the same error inside as well:
    BUILD: C:\Program Files\Java\jre1.8.0_31\bin\java -Dfile.encoding=UTF-8 -classpath C:\Program Files\Java\jre1.8.0_31\lib\tools.jar;C:\Source\connectiq-sdk-win-1.0.0\bin\monkeybrains.jar; com.garmin.monkeybrains.Monkeybrains -a C:\Source\connectiq-sdk-win-1.0.0\bin\api.db -i C:\Source\connectiq-sdk-win-1.0.0\bin\api.debug.xml -o C:\Source\connectiq-sdk-win-1.0.0\samples\MO2Display\bin\MO2Display.prg -w -z C:\Source\connectiq-sdk-win-1.0.0\samples\MO2Display\resources\strings.xml;C:\Source\connectiq-sdk-win-1.0.0\samples\MO2Display\resources\resources.xml;C:\Source\connectiq-sdk-win-1.0.0\samples\MO2Display\resources\bitmaps.xml -m C:\Source\connectiq-sdk-win-1.0.0\samples\MO2Display\manifest.xml -u C:\Source\connectiq-sdk-win-1.0.0\bin\devices.xml C:\Source\connectiq-sdk-win-1.0.0\samples\MO2Display\source\PageIndicator.mc C:\Source\connectiq-sdk-win-1.0.0\samples\MO2Display\source\MainView.mc C:\Source\connectiq-sdk-win-1.0.0\samples\MO2Display\source\MO2Sensor.mc C:\Source\connectiq-sdk-win-1.0.0\samples\MO2Display\source\MO2DisplayApp.mc C:\Source\connectiq-sdk-win-1.0.0\samples\MO2Display\source\MO2Delegate.mc C:\Source\connectiq-sdk-win-1.0.0\samples\MO2Display\source\GraphView.mc C:\Source\connectiq-sdk-win-1.0.0\samples\MO2Display\source\Graph.mc C:\Source\connectiq-sdk-win-1.0.0\samples\MO2Display\source\DataView.mc C:\Source\connectiq-sdk-win-1.0.0\samples\MO2Display\source\CommandView.mc
    BUILD: java.lang.NullPointerException
    BUILD: at com.garmin.monkeybrains.asm.SymbolTable.getEntry(SymbolTable.java:47)
    BUILD: at com.garmin.monkeybrains.asm.PermissionEntry.resolve(PermissionEntry.java:60)
    BUILD: at com.garmin.monkeybrains.asm.Assembler.resolve(Assembler.java:1012)
    BUILD: at com.garmin.monkeybrains.asm.Assembler.resolve(Assembler.java:814)
    BUILD: at com.garmin.monkeybrains.asm.Assembler.assemble(Assembler.java:542)
    BUILD: at com.garmin.monkeybrains.compiler.Compiler.assemble(Compiler.java:580)
    BUILD: at com.garmin.monkeybrains.Monkeybrains.main(Monkeybrains.java:296)
    BUILD: ERROR: Unknown:0: null
  • Solved, in a bit weird way.
    Looking into the compiler code (monkeybrains.jar) I've found that all permissions resolved into a Toybox class, e.g. Positioning into Toybox_Position. But for Ant it has Toybx_Ant. It seems like a typo. And so it was - when I've edited the string in the class file and recreated a jar file, I can compile the app with Ant permission. And it works on 920XT!
    How come other people are able to develop apps with Ant?
  • Former Member
    Former Member over 10 years ago
    I looked through the commits in our project and there was indeed the typo you mentioned. Nearly all of the app information (different app types, app permissions, etc) has been pulled out of the Java code into a XML file. With this change - which will be included with the next update - the typo you mentioned is no longer an issue.
  • I can confirm that with 1.1.0 version of SDK it works fine.
  • I can confirm that with 1.1.0 version of SDK it works fine.


    Version 1.1.0??? From where???
  • http://developer.garmin.com/downloads/connect-iq/sdks/connectiq-sdk-win-1.1.0.zip
    It was uploaded tonight and I'm still waiting for official announcement. Today Apps and Widgets should enter the store, so there might be new 920XT firmware along new CIQ SDK. Doing a diff between version, not much has changed in the interface. But I like doc improvements.
  • At the very least they added Ui.TextPicker, and the ConnectIQ iOS framework. It also appears that there are two new modules (AntPlus and PersistedLocations), but I'm not sure that they are working yet.
  • You can also get the 1.1.0 SDK by way of the "SDK Manager" (Connect IQ menu) in Eclipse.