Facing Error "duplicate declaration of ‘Screen2’" after copy screen

i need help.i make my app home screen in 1st screen.that’s why i copy my first screen & create another.but now that was showing eror.when it was on first screen i can build apk.but now when i go to build my apk after copy my 1st screen it’s doesn’t build.showing that eror​

:point_down::weary:

Kodular is unable to compile this project.
The compiler error output was
________Checking dangerous extensions
________Preparing application icon
________Creating animation xml
________Creating fragment xml
________Creating listview xml in res/layout/…
________Creating listview xml in res/layout-v21/…
________Creating xml in res/drawable/…
________Creating splash png in res/drawable/…
________Creating colors xml
________Creating strings xml
________Creating styles xml
________Creating drawables xml v21
________Checking for firebase
________Creating provider_path xml
________Creating network_security_config xml
________Generating manifest file
________Attaching native libraries
________Attaching Android Archive (AAR) libraries
________Attaching component assets
________Invoking AAPT
AAPT time: 0.8 seconds
________Compiling source files
(compiling io/kodular/msr79526/Custom_ListView_Demo/view.yail to io.kodular.msr79526.Custom_ListView_Demo.view)
(compiling io/kodular/msr79526/Custom_ListView_Demo/Screen1.yail to io.kodular.msr79526.Custom_ListView_Demo.Screen1)
(compiling io/kodular/msr79526/Custom_ListView_Demo/Screen2.yail to io.kodular.msr79526.Custom_ListView_Demo.Screen2)
ERROR: io/kodular/msr79526/Custom_ListView_Demo/Screen2.yail line 138: duplicate declaration of ‘Screen2’
ERROR: io/kodular/msr79526/Custom_ListView_Demo/Screen2.yail line 5: (this is the previous declaration of ‘Screen2’)
ERROR: io/kodular/msr79526/Custom_ListView_Demo/Screen2.yail line 147: duplicate declaration of ‘Screen2$Initialize’
ERROR: io/kodular/msr79526/Custom_ListView_Demo/Screen2.yail line 147: (this is the previous declaration of ‘Screen2$Initialize’)
Kawa compile time: 1.673 seconds

Did you use custom listview from deephost

This is you error post some blocks of screen 2

Please change your title to something that reflects your question. I unlist this for now.

2 Likes

Yep.any solution

the error says that you declared/initialized screen wrong, post your blocks related to screen1 and screen2

I just create open another screen block to go from 1st screen to 2nd screen.

Set clock1.timer disabled to true before opening another scrren2

1 Like

Nothing happene. Same eror

How did you intialize screen 2 block show and name of screen also

grafik

show your blocks …

1 Like

I do that already

… then show your blocks, especially on Screen2.Initialize


That’s block i used in screen 2 initialize

You are intializing global switch as an empty list and on screen 2 intialize you just set global switch to 2.
Change global switch to 0 not an empty list

1 Like

I delete switch variable but same eror

Did you use any extension

Yes.but i delete all extention for this eror.only asynchronous image loader extention available