Build error :Duplicate declaration

ERROR: appinventor/ai_xxxxxxxxxxxxxxxx/SmartSticko/mode.yail line 5: duplicate declaration of 'mode' this error is showing when I try to build.
How to solve this error?
here is the block of the screen named mode.


here is the block of the screen named mode.

Change the name of the Firebase tag, probably the same name "mode" for both a screen and a tag creates a conflict.

1 Like

I have changed the tag name and also removed the word "mode" from block and replaced the word with another.But still same error is being showed.

Hmmmm ...
I see that you change the screens by clicking on a button: remember to disable any clock belonging to screen "n" before leaving it, otherwise it will still fire even if its owner screen is not active anymore, and this will cause unpredictable results (at least a runtime error).

EDIT: please also check the documentation related to the "virtual screens" use, instead of the real ones. By using virtual screens (horizontal and/or vertical layouts made visible/unvisible only when necessary) avoids any problem about clocks, variables to be passed on, and opening/closing of screens with the appropriate sequence.

mode may be a reserved word/name.

  • Change the screen name to some thing else (mode01 ?)

  • Check all your components to ensure that none of them are named/renamed as mode in the designer.

1 Like