# WindowManager.InvalidDisplayException

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# InvalidDisplayException

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/view/WindowManager.InvalidDisplayException "View this page in Java")  

```
open class InvalidDisplayException : RuntimeException
```

|---|---|---|---|----------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                                    |||||
| ↳ | [kotlin.Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)                                                                     ||||
|   | ↳ | [java.lang.Exception](https://developer.android.com/reference/kotlin/java/lang/Exception.html#)                                                                |||
|   |   | ↳ | [java.lang.RuntimeException](https://developer.android.com/reference/kotlin/java/lang/RuntimeException.html#)                                               ||
|   |   |   | ↳ | [android.view.WindowManager.InvalidDisplayException](https://developer.android.com/reference/kotlin/android/view/WindowManager.InvalidDisplayException#) |

Exception that is thrown when calling[addView](https://developer.android.com/reference/kotlin/android/view/ViewManager#addView(android.view.View,%20android.view.ViewGroup.LayoutParams))to a secondary display that cannot be found. See[android.app.Presentation](https://developer.android.com/reference/kotlin/android/app/Presentation.html#)for more information on secondary displays.

## Summary

|                                                                                                                             Public constructors                                                                                                                              ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [InvalidDisplayException](https://developer.android.com/reference/kotlin/android/view/WindowManager.InvalidDisplayException#InvalidDisplayException())`()` <br />                                                                                                         |
| [InvalidDisplayException](https://developer.android.com/reference/kotlin/android/view/WindowManager.InvalidDisplayException#InvalidDisplayException(kotlin.String))`(`name:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` <br /> |

## Public constructors

### InvalidDisplayException

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
InvalidDisplayException()
```  

### InvalidDisplayException

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
InvalidDisplayException(name: String!)
```