Android Question App Crash how to know why?


New Member
I program an App with 2 activity(1 and 2). Everything runs perfect, but after several times of the App runs perfect, anytime when I start the app and goto activity 2, the App crash. In debug mode I got nothing report, I try to use Try...Catch to get what error but got nothing. After the App Crash for 1 time, each time I goto activity 2 the APP crash even if I reinstall it. I found a solution to make the App run rerfect again is to goto settings and clear the App's data, then it runs perfect again. But after some times of perfect run, it do the same crash again. So I need to clear the App's data again ...
In the App I do nothing about store data in memory or SD card. But I notice in settings the App's data can grow to several handred KB.
I use B4A 12.5, JDK18, Android SDK 31.
How can I know what happened when the App crash? Or how can I avoid it?


New Member
ok, My next app will use B4XPages. (But this one I need portrait in activity 1 and landscape in activity 2, It's maybe complex.)
I still want to know why this happened. I found something new. When I use designer modify anything, even if a Text, next time when I deploy the app to my phone, it must crash when goto activity 2, I need to clear app data (always 4.1KB). I use xCustomListView and load 72 small BMP Item, is that take too long the time, that Android kill it? I now set the loadlayout animation to 500ms, It seems better (most cases goto activity 2 don't crash) but I don't know why. (Still when I use designer to modify anything, even if a Text, next time when I deploy the app to my phone, it must crash.)
Upvote 0


Licensed User
Longtime User
Run your app connected to the IDE (B4-brigde or USB cable). When you get the crash, something must be shown in the IDE logs.
Even better, upload your app or a simplified version
Upvote 0