Android crash after exit

My app have an Exit button, that when clicked, after it is closed, show a message that the app has crashed.
The command i used is: openfl.system.System.exit(0);
It happens in a randon way (not always crash) and I notice that it crashes on Samsung devices (S7 and S8).
Is there a better way to close an android app?

Thanks.

What version of Lime are you using? Thanks :slight_smile:

I’m using Lime 5.2.1
openFL: 5.1.5

Does it close better (or more consistently) using Sys.exit?

It seems that solves the problem. Thanks a lot.