2014년 12월 2일 화요일

Help with error of completed app

Hi all, I need help with this. After a multiple switch of screen, this notification will appear and my app will be closed. How can I solve this. Appreciate for your help.



see here how to switch screens correctly

Manager Screen Demonstration

A screen always returns to the screen that opened it. You can get the effect of screens switching to arbitrary other screen by setting up a "manager screen" that is used for opening all the other screens.



I did exactly the same thing. I have a manager screen which open all the other screens. I have a lot of screens therefore some will be shared together in a screen. I have a back button in every screen. So whenever it is clicked upon, it will return to the screen which initialize it. 

When switching to another screen:
Eg. Manager screen -> screen 2 -> screen 3 

When returning:
Eg. Screen 3 -> Screen 2 -> Manager screen 

*Screen 3 information is linked to screen 2. 

What should i do ? 



You shouldn't have a "lot" of screens... 10 at the most...  You need to reuse screens or use them for multiple purposes...

Also keep in mind that other than Screen1, and even screen1 in some cases, Android can destroy, at any time it needs resources, your app window (screen) without warning.  If you're depending upon Screen2 to always be available wihen you're working on Screen3, you're mistaken and it's a dangerous programming road to go down...



Exactly how many screens do you have?  App Inventor becomes unstable if you have more than ten screens.

Do you have other apps running in the background?   They could be sharing system memory with your app. however the most likely thing is somewhere where you think you closed a screen, you possibly did not close it and are running out of system memory resulting in the crash.

You did not post any of your blocks, so further speculation is not possible without a screen capture.

Make sure you close screens when you exit them



I have a total of 10 screens but I have multiple screens shared in 1 screen by using the visible component. Even with that it will also get affected?



I have multiple screens shared in 1 screen by using the visible component. Even with that it will also get affected?
no
you should not have too much screens open the same time
with the manager screen method there are max. 2 screens open the same time 

Eg. Manager screen -> screen 2 -> screen 3 
this is not correct: if you want to go from screen2 to screen3, you close screen2 telling the manager screen to go to screen3



The first picture is my manager screen, then the blocks on manager screen, lastly the blocks on other screen. For my remaining 9 screens i have did the same thing but the fault still occurred. May i know how to solve it?






in Screen1.OtherScreenClosed you have to use additionally the notblock



if not is empty get result...

so how do you switch from the Events screen to another screen now?
in screen Events, from your screenshot I only can see a BackButton1.Click event, which closes the Event screen and you are back in the Manager screen...



I'm using the visible component. All details of the events will be fall under the same screen. So I'm using the visible component, if true/false to switch to the next screen but it is till under the event screen. Yes the back button will direct the user to the manager screen. On the manager screen, any icon can be chosen to go to the next screen. It has a back button to go back to the manager screen. How can I solve the error?



I have a total of 10 screens but I have multiple screens shared in 1 screen by using the visible component. 

ok, you have some fake screens using the screen arrangements, but how many real screens do you have and how do you switch from one real screen to another real screen?
the manager screen demonstration shows you how to switch correctly...



I have a total of 10 real screens. In order to switch from one real screen to another, it has to go back to the manager screen before switching to another screen.
 Is my blocks correct (from the previously SS)? Or is there any ways to do it? 



댓글 없음:

댓글 쓰기