第一種解決辦法:
查看AndroidManifest.xml種LAUNCHER Activity中是否有android:launchMode=“singleTask”,有的話去掉
第二種解決方法:
如果還不行的話,在引導頁的onCreate方法中加入
//防止點擊home鍵,再點擊圖標,重啓的bug
if (!isTaskRoot())
{
final Intent intent = getIntent();
final String intentAction = intent.getAction();
if (intent.hasCategory(Intent.CATEGORY_LAUNCHER) && intentAction != null && intentAction.equals(Intent.ACTION_MAIN))
{
finish();
return;
}
}
放在 setContentView();之前