Unfortunately app has stopped error on screen switch

Hello, looking for some help, please do the needful.

Every now and then I get an above-mentioned error on the app I am testing and it happens only when I am switching from screen 1 to screen 3. Basically I have stored some Html (website data) on screen 3 and I want to give access to it when there is no internet connection (offline use). Though my files are loading correctly but the app crashes on screen 3. I am using below-mentioned logic to switch screens.

blocks (1)

What should I do to correct this?. strangely, this error do not occur on screen 2 even when I am not closing the screen1. I am using text labels and a few png images (icons, arrows) on screen 3.

Don’t close Screen1 as this is the main screen of your app.

1 Like

Why if error happens you go to screen 3 ?
You can used notifer or vertical arrangement to show error message

Edit: you can use Network component to check internet connection.
If Network (internet connection) = true do to need to do, else show error message.

Here you can read documentation:
https://docs.kodular.io/components/connectivity/network/#is-connected

thanks, but even after removing the close screen block, the app is crashing on my device. may be I have to look for some other way

Show the blocks of Screen3, at least Screen3.Initialize.

did you follow tip 2 here?

to find out more about the runtime error use logcat

Taifun

thanks for the replay but I am not initialzing anything on screen 3 except a notifier. I tested the app on android 8.0 and it works fine but when I tested it on android 6.1, my old device it just stops. may be it has to do with RAM or android version, dont know

and in your first post:

So what is true?
Show your blocks of Screen3 or post the aia (or at least the APK).

I will attach the apk for reference. In case of html files, then these files are already stored in assets so it has nothing to do with screen initialize.

It doesn’t matter where files (images, HTML, …) are stored, but when and where they are called up. So if e.g. large images are loaded on Screen3 from the assets, there may be a memory overflow.

1 Like