问题描述
如果我杀死的,不是不管什么状态code我通过?我找不到在Android是否会忽略它还是某些那些导致例如任何错误信息或有任何其他意义的文件。
If I kill an Android app with System.exit(...)
, does it matter what status code I pass? I couldn't find any documentation on whether Android just ignores it or whether certain ones lead to any error messages for example or have any other meaning.
推荐答案
Android不关心,不。这是一个java的东西 - 你可以将它们用于自己的调试等等等等。
Android does not care, no. This is a java thing -- you can use them for your own debugging etc etc.
下面是系统退出codeS的一个例子:的
Here's an example of system exit codes: http://www.opensource.apple.com/source/Libc/Libc-320/include/sysexits.h
不过,pretty多,什么> 0意味着其非正常的退出。你可以将其设置为任何你想要的,但我只是坚持到0,除非你有其他的东西互动。
But pretty much, anything > 0 means that its an abnormal exit. You can set it to whatever you want, but I'd just stick to 0 unless you're interacting with other things.
它只是似乎是公认的惯例。
It just seems to be the accepted convention.
这篇关于关于是否退出状态code Android的护理传递对System.exit()?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!