# NoMatchingViewException.Builder

Artifact: [androidx.test.espresso:espresso-core](https://developer.android.com/jetpack/androidx/releases/test-espresso) [View Source](https://cs.android.com/search?q=file:androidx/test/espresso/NoMatchingViewException.java+class:androidx.test.espresso.NoMatchingViewException.Builder)

*** ** * ** ***


```
class NoMatchingViewException.Builder
```

<br />

*** ** * ** ***

Builder for `https://developer.android.com/reference/kotlin/androidx/test/espresso/NoMatchingViewException`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/test/espresso/NoMatchingViewException.Builder#Builder()()` |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/test/espresso/NoMatchingViewException!` | `https://developer.android.com/reference/kotlin/androidx/test/espresso/NoMatchingViewException.Builder#build()()` |
| `https://developer.android.com/reference/kotlin/androidx/test/espresso/NoMatchingViewException.Builder!` | `https://developer.android.com/reference/kotlin/androidx/test/espresso/NoMatchingViewException.Builder#from(androidx.test.espresso.NoMatchingViewException)(exception: https://developer.android.com/reference/kotlin/androidx/test/espresso/NoMatchingViewException!)` |
| `https://developer.android.com/reference/kotlin/androidx/test/espresso/NoMatchingViewException.Builder!` | `https://developer.android.com/reference/kotlin/androidx/test/espresso/NoMatchingViewException.Builder#includeViewHierarchy(boolean)(includeViewHierarchy: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` |
| `https://developer.android.com/reference/kotlin/androidx/test/espresso/NoMatchingViewException.Builder!` | `[withAdapterViewWarning](https://developer.android.com/reference/kotlin/androidx/test/espresso/NoMatchingViewException.Builder#withAdapterViewWarning(androidx.test.espresso.util.EspressoOptional<java.lang.String>))(adapterViewWarning: https://developer.android.com/reference/kotlin/androidx/test/espresso/util/EspressoOptional<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!)` **This function is deprecated.** use `https://developer.android.com/reference/kotlin/androidx/test/espresso/NoMatchingViewException.Builder#withAdapterViewWarning(java.lang.String)` instead <br /> |
| `https://developer.android.com/reference/kotlin/androidx/test/espresso/NoMatchingViewException.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/test/espresso/NoMatchingViewException.Builder#withAdapterViewWarning(java.lang.String)(adapterViewWarning: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` |
| `https://developer.android.com/reference/kotlin/androidx/test/espresso/NoMatchingViewException.Builder!` | `https://developer.android.com/reference/kotlin/androidx/test/espresso/NoMatchingViewException.Builder#withAdapterViews(java.util.List<android.view.View>)(adapterViews: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/android/view/View.html!>!)` |
| `https://developer.android.com/reference/kotlin/androidx/test/espresso/NoMatchingViewException.Builder!` | `https://developer.android.com/reference/kotlin/androidx/test/espresso/NoMatchingViewException.Builder#withCause(java.lang.Throwable)(cause: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!)` |
| `https://developer.android.com/reference/kotlin/androidx/test/espresso/NoMatchingViewException.Builder` | `https://developer.android.com/reference/kotlin/androidx/test/espresso/NoMatchingViewException.Builder#withMaxMsgLen(int)(maxMsgLen: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |
| `https://developer.android.com/reference/kotlin/androidx/test/espresso/NoMatchingViewException.Builder!` | `https://developer.android.com/reference/kotlin/androidx/test/espresso/NoMatchingViewException.Builder#withRootView(android.view.View)(rootView: https://developer.android.com/reference/android/view/View.html!)` |
| `https://developer.android.com/reference/kotlin/androidx/test/espresso/NoMatchingViewException.Builder` | `https://developer.android.com/reference/kotlin/androidx/test/espresso/NoMatchingViewException.Builder#withViewHierarchyFile(java.lang.String)(viewHierarchyFile: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)` |
| `https://developer.android.com/reference/kotlin/androidx/test/espresso/NoMatchingViewException.Builder!` | `https://developer.android.com/reference/kotlin/androidx/test/espresso/NoMatchingViewException.Builder#withViewMatcher(org.hamcrest.Matcher<? super android.view.View>)(viewMatcher: https://junit.org/junit4/javadoc/latest/org/hamcrest/Matcher.html<https://developer.android.com/reference/android/view/View.html!>!)` |

## Public constructors

### Builder

```
Builder()
```

## Public functions

### build

```
fun build(): NoMatchingViewException!
```

### from

```
fun from(exception: NoMatchingViewException!): NoMatchingViewException.Builder!
```

### includeViewHierarchy

```
fun includeViewHierarchy(includeViewHierarchy: Boolean): NoMatchingViewException.Builder!
```

### withAdapterViewWarning

```
fun [withAdapterViewWarning](https://developer.android.com/reference/kotlin/androidx/test/espresso/NoMatchingViewException.Builder#withAdapterViewWarning(androidx.test.espresso.util.EspressoOptional<java.lang.String>))(adapterViewWarning: EspressoOptional<String!>!): NoMatchingViewException.Builder!
```

> [!CAUTION]
> **This function is deprecated.**   
>
> use `https://developer.android.com/reference/kotlin/androidx/test/espresso/NoMatchingViewException.Builder#withAdapterViewWarning(java.lang.String)` instead

### withAdapterViewWarning

```
@CanIgnoreReturnValue
fun withAdapterViewWarning(adapterViewWarning: String!): NoMatchingViewException.Builder!
```

### withAdapterViews

```
fun withAdapterViews(adapterViews: (Mutable)List<View!>!): NoMatchingViewException.Builder!
```

### withCause

```
fun withCause(cause: Throwable!): NoMatchingViewException.Builder!
```

### withMaxMsgLen

```
fun withMaxMsgLen(maxMsgLen: Int): NoMatchingViewException.Builder
```

### withRootView

```
fun withRootView(rootView: View!): NoMatchingViewException.Builder!
```

### withViewHierarchyFile

```
fun withViewHierarchyFile(viewHierarchyFile: String?): NoMatchingViewException.Builder
```

### withViewMatcher

```
fun withViewMatcher(viewMatcher: Matcher<View!>!): NoMatchingViewException.Builder!
```