TaskStackBuilder.addParentStack not working when I was building a notification : <p>I did everything as the official docs writes.But when i navigate backwards,the MainActivity(parent) doesn't open.Instead, the application closes.</p>

<p><strong>here is my code:</strong></p>

<pre><code>Intent resultIntent = new Intent(context, TestActivity.class);

TaskStackBuilder stackBuilder = TaskStackBuilder.create(context);
stackBuilder.addParentStack(TestActivity.class);
stackBuilder.addNextIntent(resultIntent);
</code></pre>

<p><strong>the manifest is as below:</strong></p>

<pre><code>    &lt;activity
        android:name=".MainActivity"
        android:label="@string/app_name"
        android:theme="@style/AppTheme.NoActionBar"&gt;
        &lt;intent-filter&gt;
            &lt;action android:name="android.intent.action.MAIN" /&gt;

            &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
        &lt;/intent-filter&gt;
    &lt;/activity&gt;

    &lt;activity
        android:name=".TestActivity"
        android:parentActivityName=".MainActivity"&gt;
        &lt;meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value=".Main2Activity" /&gt;
    &lt;/activity&gt;
</code></pre>

<p>Thank you.</p>
