解决办法:
1、在基类Activity中 添加方法@Override public boolean moveTaskToBack(boolean nonRoot) { return super.moveTaskToBack(nonRoot);
}
2、在程序启动页Activity的onCreate()方法@Override protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState); if (!this.isTaskRoot()) {
Intent mainIntent = getIntent();
String action = mainIntent.getAction(); if (mainIntent.hasCategory(Intent.CATEGORY_LAUNCHER) && Intent.ACTION_MAIN.equals(action)) {
finish(); return;
}
}
}