Acknowledged

Build errors when using resource overrides

I'm using resource overrides for some devices to override layouts. I am using text-areas in my layout file and for devices that don't support text-areas I create device specific layout files (such as the vivoactive 3). It works fine in the simulator but when I export my project I get build errors, it seems it builds all layout files for each device. I expected that only the device specific layout file would be built. Did I misunderstand the concept? 

Here is my file structure 

resources/layouts/layout.xml
resources-round-240x240/layouts/layout.xml
resources-vivoactive3/layouts/layout.xml

Build errors:

ERROR: vivoactive3: C:\Garmin-projects\Face\resources-round-240x240\layouts\layout.xml:9: TextArea is not supported by device 'vivoactive3'.
ERROR: vivoactive3: C:\Garmin-projects\Face\resources-round-240x240\layouts\layout.xml:16: TextArea is not supported by device 'vivoactive3'.
ERROR: vivoactive3: C:\Garmin-projects\Face\resources\layouts\layout.xml:12: TextArea is not supported by device 'vivoactive3'.
ERROR: vivoactive3: C:\Garmin-projects\Face\resources\layouts\layout.xml:20: TextArea is not supported by device 'vivoactive3'.
ERROR: Failed to export application for device id: 'vivoactive3'.

running SDK: 4.2.3

Visual Code with MonkeyC v. 1.0.8

Parents
  • I've just hit the same problem. I have a specific resources folder for the vivoactive3 and can run my app on the vivoactive3 simulator but can't Export Project. I'm not sure what I need to put in the Jungle file. If I specify the vivoactive3 resources folder then I get an additional warning that that folder has been included twice, and there's still conflict with the main resources folder.

    Is the idea that I remove the layout.xml from the resources/layout folder, create another resources folder for the layout for other devices (i.e. those that support the text-area), and add lines in the Jungle file for all the other devices to call that up? That approach seems to work, but is a bit onerous so I was wondering if there was an easier way.

Comment
  • I've just hit the same problem. I have a specific resources folder for the vivoactive3 and can run my app on the vivoactive3 simulator but can't Export Project. I'm not sure what I need to put in the Jungle file. If I specify the vivoactive3 resources folder then I get an additional warning that that folder has been included twice, and there's still conflict with the main resources folder.

    Is the idea that I remove the layout.xml from the resources/layout folder, create another resources folder for the layout for other devices (i.e. those that support the text-area), and add lines in the Jungle file for all the other devices to call that up? That approach seems to work, but is a bit onerous so I was wondering if there was an easier way.

Children
No Data