App crashes in companion

The aia works all well without a vertical arrangement
also I cant change the image of the screen in screen1
Covicompanion 2_1 is the one which crashses
CoviCompanion2_1.aia (1.5 MB)
CoviCompanion2_1_checkpoint1.aia (1.4 MB)

Is because the limit of things I can put in the app has reached?

Look at the number of screens you have.


However, a lot of your screens have only have around 50 blocks. Try to combine 5 screens that have around 100 blocks into 1 screen that has 500 blocks.

When we define virtual screens, we use one 'real' App Inventor Screen (most often Screen1). Screen-sized Vertical Arrangements on it are displayed/hidden as required - they are the Virtual Screens. This is generally a better approach for multi-screen Apps, they share data without having to "pass" it between screens and it also reduces code duplication, making the App more efficient and the code easier to follow if you have to return to it at a later date.

So, instead of separate "houses", virtual screens are "rooms" of the same "house".

Taken from here. Thank you Chris!

Also, you are incorrectly switching screens. Think about a screen as a tab in Chrome. When you open a screen like this:


your old screen is still in the background, but inactive. The old screen is really unnecessary. When you open Screen1 in "Screen1causewhythehecknotquestionmark" again, you have 2 unnecessary screens in the background and 1 active screen. Pile that up, you have opened 20 screens, which is way over the limit.


ok Ill do the virtual screens but what about the open another screen is there a way to close that screen?

use do result

1 Like

Yes, there is!


Use the "do result" block. The "do result" block does something and returns something. In the example, we close the screen before we open a new screen.

in do take close screen

1 Like

Just like that only

1 Like

Ok will update in 5 to 10 minutes
(realized you saw all the weird screen names)

CoviCompanion2_1 (1).aia (1.5 MB)
still same problem

16 screens to 9

First do your work slowly and carefully, switch all screens correctly and then come back ...

well so, the old app
very old one works with no problem
the code is the same with 16 screens
CoviCompanion1.aia (1.3 MB)

can any admin close this?

This will close automatically after 7 days after the last reply.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.