在onCreate()方法中增加如下代码即可: if (!isTaskRoot()) { finish(); return; } 转载于:https://www.cnblogs.com/baiyi168/p/5794819.html