Android - Perfect solution for quitting or terminating an application programmatically?
问题 If my app encounters a particular error, I want to end my app without any trace of it remaining in the system. I have already seen many threads on this topic, specially these two. Is quitting an application frowned upon? How to quit android application programmatically The answers are great but the proposed solutions are too tedious and/or unnecessarily complex. 回答1: Taking a cue from Neil Traft's answer in the first post above, I have found a perfect solution for such scenarios. System.exit