1.在AndroidManifest.xml里添加权限:<uses-permission android:name="android.permission.RESTART_PACKAGES" />2.在要执行关闭程序的按钮事件里写:ActivityManager am = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);am.restartPackage(getPackageName());