 <p>From developer.android.com: </p> <blockquote> <p>Subclasses should override this method and verify that the given fragment is a valid type to be attached to this activity. The default implementation returns true for apps built for android:targetSdkVersion older than KITKAT. For later versions, it will throw an exception.</p> </blockquote> <p>Basically on TargetSDK &lt;= KITKAT, you should make sure the fragment name <code>isValidFragment</code> passes is a correct one.</p>