3.0.0 Beta1 Invalid symbol "Background" used in context of a new object instantiation

Hi there,

I recently upgraded to CIQ 3.0.0 Beta1 (from 2.4.5) and tried building and running one of my projects, unchanged from 2.4.5. I received the following errors, which make no sense to me as I'm not using any layouts and "Background" only exists in one place in all source files - in the middle of a function name "getBackgroundColor()".

BUILD: ERROR(Edge® 1030): Rez:92: Invalid symbol "Background" used in the context of a new object instantiation. No class exists with the given symbol name.
BUILD: ERROR(Edge® 1030): Rez:118: Invalid symbol "Background" used in the context of a new object instantiation. No class exists with the given symbol name.
BUILD: ERROR(Edge® 1030): Rez:138: Invalid symbol "Background" used in the context of a new object instantiation. No class exists with the given symbol name.
BUILD: ERROR(Edge® 1030): Rez:158: Invalid symbol "Background" used in the context of a new object instantiation. No class exists with the given symbol name.
BUILD: ERROR(Edge® 1030): Rez:178: Invalid symbol "Background" used in the context of a new object instantiation. No class exists with the given symbol name.

Any ideas on what might cause these errors?


Thanks,
Rob.

  • Hi el34rob2 !
    Thanks for the report - that is something I have not seen previously. Would you possibly be okay with sharing the code with me that is causing these build errors? If so, you can send it to [EMAIL="[email protected]"][email protected][/EMAIL]. I would like to track down what is exactly happening since it appears to be errors from code generated by the Monkey C Compiler.

    In the meantime, you can get around these errors by upgrading them to warnings. You just need to use the compiler command line option --Eno-invalid-symbol.

    Marianne
  • Hi Marianne,

    I've got another test project which produces the same errors, as per the following output, which I can send you. How can I get it to you? I can't seem to upload a ZIP file of the project...

    BUILD: /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/bin/java -Dfile.encoding=UTF-8 -Dapple.awt.UIElement=true -jar /Users/rda/Documents/BikeStuff/GarminConnect/SDK/connectiq-sdk-mac-3.0.0-beta1/bin/monkeybrains.jar -o /Users/rda/Documents/BikeStuff/GarminConnect/eclipse-ws/ClipTest/bin/ClipTest.prg -w -y /Users/rda/Documents/BikeStuff/GarminConnect/developer_key -d edge1030_sim -s 2.3.0 -f /Users/rda/Documents/BikeStuff/GarminConnect/eclipse-ws/ClipTest/monkey.jungle

    BUILD: ERROR(Edge® 1030): Rez:25: Invalid symbol "Background" used in the context of a new object instantiation. No class exists with the given symbol name.
    BUILD: ERROR(Edge® 1030): Rez:51: Invalid symbol "Background" used in the context of a new object instantiation. No class exists with the given symbol name.
    BUILD: ERROR(Edge® 1030): Rez:71: Invalid symbol "Background" used in the context of a new object instantiation. No class exists with the given symbol name.
    BUILD: ERROR(Edge® 1030): Rez:91: Invalid symbol "Background" used in the context of a new object instantiation. No class exists with the given symbol name.
    BUILD: ERROR(Edge® 1030): Rez:111: Invalid symbol "Background" used in the context of a new object instantiation. No class exists with the given symbol name.
    BUILD: WARNING: The launcher icon (30x30) is smaller than the specified launcher icon size of the device 'edge1030' (36x36). Padding will be added to the image to center it.
    BUILD: Complete
    Aborting launch due to failed build.


    Hope this helps.


    Thanks,
    Rob.
  • I took a quick peek, and the project is indeed using layouts and in those layouts it is referring to an entity called Background.

    C:\Users\vitek\Desktop\ClipTest>findstr /s /c:"Background" *.*
    resources\layouts\layouts.xml: <drawable class="Background" />
    resources\layouts\layouts.xml: <drawable class="Background" />
    resources\layouts\layouts.xml: <drawable class="Background" />
    resources\layouts\layouts.xml: <drawable class="Background" />
    resources\layouts\layouts.xml: <drawable class="Background" />


    It looks to me like you've copied this project from another source and eliminated some of the source (the code that defines the class Background), but have not eliminated the resource code (the layout definitions) that reference it.

    Travis
  • That's a bit embarrassing. Thanks Travis. I did copy the source structure from somewhere, but I'm not using layouts. When I delete the layouts.html file the world returns to normal.

    Cheers,
    Rob.