<intent-filter>   
  <action android:name="android.intent.action.CREATE_SHORTCUT"/>   
</intent-filter>  <action>这段去掉
<activity>加上 android:alwaysRetainTaskState="true"这句

解决方案 »

  1.   

    我也遇到这个问题,<activity>加上 android:alwaysRetainTaskState="true"这句  加上这句也不得,拜托各位大神了!
      

  2.   

        private void addShortcut(){  
         Intent shortcutIntent = new Intent(this, MainActivity.class);
         shortcutIntent.addCategory(Intent.CATEGORY_LAUNCHER);
         shortcutIntent.setAction(Intent.ACTION_MAIN);
         shortcutIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
         Intent shortcut = new Intent("com.android.launcher.action.INSTALL_SHORTCUT");  
         //快捷方式的名称  
         shortcut.putExtra(Intent.EXTRA_SHORTCUT_NAME, getString(R.string.app_name));  
         shortcut.putExtra("duplicate", false); //不允许重复创建  
         shortcut.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent); 
            sendBroadcast(shortcut);
        }
      

  3.   

    这个感觉和Launcher有关系,不一定是你应用的问题,