Can't Track Down BUILD Errors--Including Assembler Errors

It is driving me crazy trying to find the cause of certain build errors. None of the errors specify a file (like a .mc file) and I have searched over all the files in my Eclipse project, tried clean building, updating all Eclipse Connect IQ apps, looking at the bin/xxx.prg.debug.xml file, checking the manifest.xml file, but no hints on what is causing the errors. One big mystery is it complains about fields like "NonstopWatch1", and "globals", which I can find no references to. Thanks for any help you can give me!!

Here are the details:

Eclipse: Oxygen.3a Release (4.7.3a), Build 20180405-1200
OS: Mac 10.13.4
Java: jdk1.8.0_131
Connect IQ: connectiq-sdk-mac-2.4.5

Build Output

See attached build-results.txt file. I couldn't get this forum's interface to allow the results in-line (Preview gets errors).



Manifest File

See attached manifest.xml file. I couldn't get this forum's interface to allow the xml in-line (Preview gets errors).
  • Can you build anything, like one of the samples in the SDK for example?

    If not, it could be your install. A common problem that shows up at times is sometimes, if there are spaces in pathnames, odd things can happen.
  • Yes, I have an eclipse WatchFace project that builds and runs just fine and specifies the same minSdkVersion.
  • In your project, you need a class that extends App.AppBase that is named NonstopWatch.

    Do you have that, and is it being built?

    class NonstopWatch extends App.AppBase {
  • Yes, the class is there in the 'source' directory with the right signature. I assuming it isn't built given since the 'bin' directory doesn't have a NonstopWatch.prg file(?).
    Since the assembler is claiming it can't resolve the entry class, are the earlier strange lines useful in determining the problem? Specifically:

    BUILD: line 53:0 token recognition error at: ''
    BUILD: line 53:0 token recognition error at: ''
    BUILD: line 24:13 mismatched input 'globals' expecting {IntNumber, HexNumber, OctalNumber}
    BUILD: line 25:4 extraneous input 'NonstopWatch' expecting {IntNumber, HexNumber, OctalNumber}

    BUILD: com.garmin.monkeybrains.asm.AssemblerException: Unable to resolve entry class. Check the manifest file.

    What I don't understand is what lines BUILD is referring to--in what file?
  • Put an intentional typo in your NonstopWatch class, just to be sure you are using the code you think you are. then maybe post the code for your NonstopWatch class.

    "BUILD" is building your .prg, and there's a number of things that happens, like compiling each of your .mc files, resources, etc.
  • Former Member
    Former Member over 7 years ago
    mlcreech it looks like jim_m_58 is on the right track. The most helpful thing at this point would be to see some of the code. Based on the errors, I think we could find the issue even if we have the first few lines from the "using" statement up to the base class definition. Do your filenames match the class name? Do you have a duplicate class declared anywhere? etc.

    Thanks,
    - Coleman
  • My NonstopWatch class was definitely being used--introducing a typo changed the behavior to giving a syntax error.

    After ripping out big chunks of the code, I figured out the main problem, although I don't understand why it isn't caught as a simple syntax error. The code I'm interpreting was taken from an old widget I wrote. At that time, I believe Monkey C didn't have the 'const' construct for making constants, but instead allowed 'static var' definitions. I had carried these over from the old code and interpreted with new Monkey C. For example:

    static hidden var EPOCH_TIME_PROP = "EpochTime";

    instead of:
    hidden const EPOCH_TIME_PROP = "EpochTime";

    The original assembler messages I showed are still being issued, but aren't stopping the widget from running (the Eclipse console window is erasing the messages immediately erased by Eclipse when the widget starts running).
  • I think I've encountered something like this before trying to re-use existing code, but in my case I was just experimenting for testing purposes and just scrapped my broken code and made a new app. I hadn't seen it since that one time, so assumed I had missed something simple (like the entry point in the manifest).

    Since you have a reproducible example, would you mind sending along the non-working version of your source code? I'd like to have our compiler folks take a look and see whether we can handle this better. If you're willing, you can email it to [email][email protected][/email].
  • I am bumping into the same problem. I have a several datafields dat also have a copy-version, to allow for a different set of settings (DR7c0 and DR6c0, for instance). Normally I can create a copy version by just copying all the files over except for the manifest file and then replace the line

    class DatarunpremiumApp extends Toybox.Application.AppBase {

    by:

    class Datarunpremiumwith7metricscopy2App extends Toybox.Application.AppBase {

    I also change the string files and app name in the resources, alongside some changes in the code (as the license for the copy version can be generated through the main version).

    The error is only there when compiling for the midrange watches, like the Fenix 5 for example:

    BUILD: ERROR: fenix5: unknown:0: Unable to resolve entry class. Check the manifest file.


    The triathlon and Fenix watches have no problem and if I remove the midrange watches it builds fine.There is probably some reason why this doesn't work anymore. I have added a background process for the high-end watches which also uses storage in the latest version of the main version. However, it is quite unhelpful that the compiler throws in a non-descriptive error. I cannot find the cause and only know now that the problem is with the midrange watches.

    PS: the manifest looks like this and apart from the application entry name and ID it is exactly the same as the main version. The jungle file is copied from the main version as well and has different resourcepaths and sourcepaths for the different types of watches

    <!-- 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="Datarunpremiumwith7metricscopy2App" id="56425202-0119-4e9f-a482-eb9641ec2950" launcherIcon="@Drawables.LauncherIcon" minSdkVersion="1.3.0" name="@Strings.AppName" type="datafield" version="0.0.1">
            <iq:products>
                <iq:product id="fenix5s"/>
                <iq:product id="fenixchronos"/>
                <iq:product id="fenix5"/>
                <iq:product id="fenix5x"/>
                <iq:product id="fenix6spro"/>
                <iq:product id="fenix6pro"/>
                <iq:product id="fenix6xpro"/>             
                <iq:product id="fr735xt"/>
                <iq:product id="fr935"/> 
                <iq:product id="fenix5plus"/>
                <iq:product id="fenix5splus"/>
                <iq:product id="fenix5xplus"/>
                <iq:product id="d2charlie"/>
                <iq:product id="d2delta"/>
                <iq:product id="d2deltapx"/>
                <iq:product id="d2deltas"/>
                <iq:product id="fr645m"/>
                <iq:product id="fr645"/>
                <iq:product id="fr245m"/>
                <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="descentmk1"/>           
            </iq:products>
            <iq:permissions>
                <iq:uses-permission id="UserProfile"/>
                <iq:uses-permission id="Sensor"/>
                <iq:uses-permission id="SensorHistory"/>
                <iq:uses-permission id="Background"/>
            </iq:permissions>
            <iq:languages>
                <iq:language>eng</iq:language>
            </iq:languages>
            <iq:barrels/>
        </iq:application>
    </iq:manifest>
    
    

  • is your baseApp "Datarunpremiumwith7metricscopy2App"?