SLS exports a deleted screen and breaks compilation

What do you want to achieve?

Export my current project with a deleted screen and have all corresponding code removed from the generated code.

What have you tried so far?

Exporting, deleting and re-creating the screen with the exact same name



src/ui/ui.c: In function 'ui_event_home_tbns':
src/ui/ui.c:450:27: error: 'ui_screen_settings' undeclared (first use in this function); did you mean 'ui_screen_pos'?
       _ui_screen_change( &ui_screen_settings, LV_SCR_LOAD_ANIM_MOVE_BOTTOM, 200, 0, &ui_screen_settings_screen_init);

SLS declared screens

It looks like SLS mirrors screen config somewhere and does not clean the corresponding data / cache / structure when deleting a screen, thus exporting a ghost, deleted screen and pollutes code with missing screen declarations.


  • SquareLine Studio version: 1.3.4
  • Operating system: MacSO Sonoma
  • Target hardware: ESP32-S3

Are you using Arduino IDE?

I was getting this problem too when I renamed a screen and exported the new UI files. During the compile, there were strange error references to the old screen name. However, a search of all the UI and .ino sketch files showed no trace of the old screen name.

I was able to get around this problem by saving the sketch in Arduino IDE with a new sketch name. Then all traces of the problem vanished.

Bottom line: I am not sure if the problem lies with SLS or with Arduino IDE. But I suspect it might be in the Arduino IDE retaining old ghosts in its cache closet.

In the new 1.4.0 version of SquareLine Studio the old screens that are not referenced anymore by the project, are deleted from the UI-export folder upon exporting the UI or the template project.