Stay organized with collections
Save and categorize content based on your preferences.
PropertyTypeMismatchException
open class PropertyTypeMismatchException : RuntimeException
Thrown if a client calls a typed read method for a property of a different type.
Summary
Public constructors
PropertyTypeMismatchException
PropertyTypeMismatchException(
id: Int,
expectedPropertyType: String,
actualPropertyType: String)
Parameters |
expectedPropertyType |
String: This value cannot be null . |
actualPropertyType |
String: This value cannot be null . |
PropertyTypeMismatchException
PropertyTypeMismatchException(
id: Int,
expectedPropertyType: String,
actualPropertyType: String,
propertyName: String?)
Parameters |
expectedPropertyType |
String: This value cannot be null . |
actualPropertyType |
String: This value cannot be null . |
propertyName |
String?: This value may be null . |
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,["# PropertyReader.PropertyTypeMismatchException\n\nAdded in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nPropertyTypeMismatchException\n=============================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/view/inspector/PropertyReader.PropertyTypeMismatchException \"View this page in Java\") \n\n```\nopen class PropertyTypeMismatchException : RuntimeException\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.view.inspector.PropertyReader.PropertyTypeMismatchException](#) |\n\nThrown if a client calls a typed read method for a property of a different type.\n\nSummary\n-------\n\n| Public constructors ||\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [PropertyTypeMismatchException](#PropertyTypeMismatchException(kotlin.Int,%20kotlin.String,%20kotlin.String))`(`id:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `expectedPropertyType:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `actualPropertyType:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` \u003cbr /\u003e |\n| [PropertyTypeMismatchException](#PropertyTypeMismatchException(kotlin.Int,%20kotlin.String,%20kotlin.String,%20kotlin.String))`(`id:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `expectedPropertyType:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `actualPropertyType:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `propertyName:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?`)` \u003cbr /\u003e |\n\nPublic constructors\n-------------------\n\n### PropertyTypeMismatchException\n\nAdded in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nPropertyTypeMismatchException(\n id: Int, \n expectedPropertyType: String, \n actualPropertyType: String)\n```\n\n| Parameters ||\n|------------------------|----------------------------------------------------------------------------------------------------------------|\n| `expectedPropertyType` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): This value cannot be `null`. |\n| `actualPropertyType` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): This value cannot be `null`. |\n\n### PropertyTypeMismatchException\n\nAdded in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nPropertyTypeMismatchException(\n id: Int, \n expectedPropertyType: String, \n actualPropertyType: String, \n propertyName: String?)\n```\n\n| Parameters ||\n|------------------------|----------------------------------------------------------------------------------------------------------------|\n| `expectedPropertyType` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): This value cannot be `null`. |\n| `actualPropertyType` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): This value cannot be `null`. |\n| `propertyName` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?: This value may be `null`. |"]]