//获取当前进程的id int pid = android.os.Process.myPid(); //这个方法只能用于自杀操作 android.os.Process.killProcess(pid);
<span style="white-space:pre"> </span>System.exit(0);
ActivityManager am = (ActivityManager) getSystemService(ACTIVITY_SERVICE); am.killBackgroundProcesses(getPackageName());第三种需要添加权限:
<uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES"/>
原文地址:http://blog.csdn.net/u013771273/article/details/43837395