Stay organized with collections
Save and categorize content based on your preferences.
InstantiationException
open class InstantiationException : AndroidRuntimeException
Thrown by Fragment.instantiate(Context, String, Bundle)
when there is an instantiation failure.
Summary
Public constructors
InstantiationException
InstantiationException(
msg: String!,
cause: Exception!)
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# Fragment.InstantiationException\n\nAdded in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nDeprecated in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nInstantiationException\n======================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/app/Fragment.InstantiationException \"View this page in Java\") \n\n```\nopen class InstantiationException : AndroidRuntimeException\n```\n\n|---|---|---|---|---|--------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||||||\n| ↳ | [kotlin.Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html) |||||\n| | ↳ | [java.lang.Exception](../../java/lang/Exception.html#) ||||\n| | | ↳ | [java.lang.RuntimeException](../../java/lang/RuntimeException.html#) |||\n| | | | ↳ | [android.util.AndroidRuntimeException](../util/AndroidRuntimeException.html#) ||\n| | | | | ↳ | [android.app.Fragment.InstantiationException](#) |\n\n*** ** * ** ***\n\n| **This exception was deprecated in API level 28.**\n|\n| Use androidx.fragment.app.Fragment.InstantiationException\n\nThrown by [Fragment.instantiate(Context, String, Bundle)](/reference/kotlin/android/app/Fragment#instantiate(android.content.Context,%20kotlin.String,%20android.os.Bundle)) when there is an instantiation failure.\n\nSummary\n-------\n\n| Public constructors ||\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [InstantiationException](#InstantiationException(kotlin.String,%20java.lang.Exception))`(`msg:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`, `cause:` `[Exception](../../java/lang/Exception.html#)!`)` \u003cbr /\u003e |\n\nPublic constructors\n-------------------\n\n### InstantiationException\n\nAdded in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nInstantiationException(\n msg: String!, \n cause: Exception!)\n```"]]