# AmbiguousViewMatcherException.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/AmbiguousViewMatcherException.java+class:androidx.test.espresso.AmbiguousViewMatcherException.Builder)

*** ** * ** ***


```
public class AmbiguousViewMatcherException.Builder
```

<br />

*** ** * ** ***

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

## Summary

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

| ### Public methods |
|---|---|
| `https://developer.android.com/reference/androidx/test/espresso/AmbiguousViewMatcherException` | `https://developer.android.com/reference/androidx/test/espresso/AmbiguousViewMatcherException.Builder#build()()` |
| `https://developer.android.com/reference/androidx/test/espresso/AmbiguousViewMatcherException.Builder` | `https://developer.android.com/reference/androidx/test/espresso/AmbiguousViewMatcherException.Builder#from(androidx.test.espresso.AmbiguousViewMatcherException)(https://developer.android.com/reference/androidx/test/espresso/AmbiguousViewMatcherException exception)` |
| `https://developer.android.com/reference/androidx/test/espresso/AmbiguousViewMatcherException.Builder` | `https://developer.android.com/reference/androidx/test/espresso/AmbiguousViewMatcherException.Builder#includeViewHierarchy(boolean)(boolean includeViewHierarchy)` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/test/espresso/AmbiguousViewMatcherException.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/test/espresso/AmbiguousViewMatcherException.Builder#withMaxMsgLen(int)(int maxMsgLen)` |
| `https://developer.android.com/reference/androidx/test/espresso/AmbiguousViewMatcherException.Builder` | `https://developer.android.com/reference/androidx/test/espresso/AmbiguousViewMatcherException.Builder#withOtherAmbiguousViews(android.view.View...)(View[] others)` |
| `https://developer.android.com/reference/androidx/test/espresso/AmbiguousViewMatcherException.Builder` | `https://developer.android.com/reference/androidx/test/espresso/AmbiguousViewMatcherException.Builder#withRootView(android.view.View)(https://developer.android.com/reference/android/view/View.html rootView)` |
| `https://developer.android.com/reference/androidx/test/espresso/AmbiguousViewMatcherException.Builder` | `https://developer.android.com/reference/androidx/test/espresso/AmbiguousViewMatcherException.Builder#withView1(android.view.View)(https://developer.android.com/reference/android/view/View.html view1)` |
| `https://developer.android.com/reference/androidx/test/espresso/AmbiguousViewMatcherException.Builder` | `https://developer.android.com/reference/androidx/test/espresso/AmbiguousViewMatcherException.Builder#withView2(android.view.View)(https://developer.android.com/reference/android/view/View.html view2)` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/test/espresso/AmbiguousViewMatcherException.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/test/espresso/AmbiguousViewMatcherException.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/AmbiguousViewMatcherException.Builder` | `https://developer.android.com/reference/androidx/test/espresso/AmbiguousViewMatcherException.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 AmbiguousViewMatcherException build()
```

### from

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

### includeViewHierarchy

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

### withMaxMsgLen

```
@CanIgnoreReturnValue
public @NonNull AmbiguousViewMatcherException.Builder withMaxMsgLen(int maxMsgLen)
```

### withOtherAmbiguousViews

```
public AmbiguousViewMatcherException.Builder withOtherAmbiguousViews(View[] others)
```

### withRootView

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

### withView1

```
public AmbiguousViewMatcherException.Builder withView1(View view1)
```

### withView2

```
public AmbiguousViewMatcherException.Builder withView2(View view2)
```

### withViewHierarchyFile

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

### withViewMatcher

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