# 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)

*** ** * ** ***


```
public class NoMatchingViewException.Builder
```

<br />

*** ** * ** ***

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

## Summary

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

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

## Public constructors

### Builder

```
public Builder()
```

## Public methods

### build

```
public NoMatchingViewException build()
```

### from

```
public NoMatchingViewException.Builder from(NoMatchingViewException exception)
```

### includeViewHierarchy

```
public NoMatchingViewException.Builder includeViewHierarchy(boolean includeViewHierarchy)
```

### withAdapterViewWarning

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

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

### withAdapterViewWarning

```
@CanIgnoreReturnValue
public NoMatchingViewException.Builder withAdapterViewWarning(String adapterViewWarning)
```

### withAdapterViews

```
public NoMatchingViewException.Builder withAdapterViews(List<View> adapterViews)
```

### withCause

```
public NoMatchingViewException.Builder withCause(Throwable cause)
```

### withMaxMsgLen

```
public @NonNull NoMatchingViewException.Builder withMaxMsgLen(int maxMsgLen)
```

### withRootView

```
public NoMatchingViewException.Builder withRootView(View rootView)
```

### withViewHierarchyFile

```
public @NonNull NoMatchingViewException.Builder withViewHierarchyFile(@Nullable String viewHierarchyFile)
```

### withViewMatcher

```
public NoMatchingViewException.Builder withViewMatcher(Matcher<View> viewMatcher)
```