# AmbiguousViewMatcherException.Builder

Summary:[Ctors](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException.Builder#pubctors)\|[Methods](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException.Builder#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException.Builder#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException.Builder#)  

# AmbiguousViewMatcherException.Builder

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public
static


class
AmbiguousViewMatcherException.Builder
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object.html)`


``


`

|---|---------------------------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||
| ↳ | android.support.test.espresso.AmbiguousViewMatcherException.Builder |

<br />

*** ** * ** ***

Builder for[AmbiguousViewMatcherException](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException).

## Summary

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

|                                                                                                                                                                                                                                           ### Public methods                                                                                                                                                                                                                                           ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` `[AmbiguousViewMatcherException](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException)                 | ` `[build](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException.Builder#build())`() `                                                                                                                                                                                                          |
| ` `[AmbiguousViewMatcherException.Builder](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException.Builder) | ` `[from](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException.Builder#from(android.support.test.espresso.AmbiguousViewMatcherException))`(`[AmbiguousViewMatcherException](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException)` exception) ` |
| ` `[AmbiguousViewMatcherException.Builder](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException.Builder) | ` `[includeViewHierarchy](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException.Builder#includeViewHierarchy(boolean))`(boolean includeViewHierarchy) `                                                                                                                                         |
| ` `[AmbiguousViewMatcherException.Builder](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException.Builder) | ` `[withOtherAmbiguousViews](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException.Builder#withOtherAmbiguousViews(android.view.View...))`(`[View...](https://developer.android.com/reference/android/view/View.html)` others) `                                                                |
| ` `[AmbiguousViewMatcherException.Builder](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException.Builder) | ` `[withRootView](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException.Builder#withRootView(android.view.View))`(`[View](https://developer.android.com/reference/android/view/View.html)` rootView) `                                                                                          |
| ` `[AmbiguousViewMatcherException.Builder](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException.Builder) | ` `[withView1](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException.Builder#withView1(android.view.View))`(`[View](https://developer.android.com/reference/android/view/View.html)` view1) `                                                                                                   |
| ` `[AmbiguousViewMatcherException.Builder](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException.Builder) | ` `[withView2](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException.Builder#withView2(android.view.View))`(`[View](https://developer.android.com/reference/android/view/View.html)` view2) `                                                                                                   |
| ` `[AmbiguousViewMatcherException.Builder](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException.Builder) | ` `[withViewMatcher](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException.Builder#withViewMatcher(org.hamcrest.Matcher<? super android.view.View>))`(Matcher<? super `[View](https://developer.android.com/reference/android/view/View.html)`> viewMatcher) `                                  |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException.Builder#)From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object.html)` ` |-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object.html)          | ` clone() `                                                                                | | ` boolean`                                                                          | ` equals(`[Object](https://developer.android.com/reference/java/lang/Object.html)` arg0) ` | | ` void`                                                                             | ` finalize() `                                                                             | | ` final `[Class](https://developer.android.com/reference/java/lang/Class.html)`<?>` | ` getClass() `                                                                             | | ` int`                                                                              | ` hashCode() `                                                                             | | ` final void`                                                                       | ` notify() `                                                                               | | ` final void`                                                                       | ` notifyAll() `                                                                            | | ` `[String](https://developer.android.com/reference/java/lang/String.html)          | ` toString() `                                                                             | | ` final void`                                                                       | ` wait(long arg0, int arg1) `                                                              | | ` final void`                                                                       | ` wait(long arg0) `                                                                        | | ` final void`                                                                       | ` wait() `                                                                                 | ||

## Public constructors

### AmbiguousViewMatcherException.Builder

```
AmbiguousViewMatcherException.Builder ()
```

<br />

<br />

## Public methods

### build

```
AmbiguousViewMatcherException build ()
```

<br />

<br />

|                                                                   Returns                                                                    ||
|--------------------------------------------------------------------------------------------------------------------------------------|--------|
| [AmbiguousViewMatcherException](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException) | <br /> |

### from

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

<br />

<br />

|                     Parameters                      ||
|-------------|----------------------------------------|
| `exception` | `AmbiguousViewMatcherException` <br /> |

|                                                                           Returns                                                                            ||
|------------------------------------------------------------------------------------------------------------------------------------------------------|--------|
| [AmbiguousViewMatcherException.Builder](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException.Builder) | <br /> |

### includeViewHierarchy

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

<br />

<br />

|                Parameters                ||
|------------------------|------------------|
| `includeViewHierarchy` | `boolean` <br /> |

|                                                                           Returns                                                                            ||
|------------------------------------------------------------------------------------------------------------------------------------------------------|--------|
| [AmbiguousViewMatcherException.Builder](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException.Builder) | <br /> |

### withOtherAmbiguousViews

```
AmbiguousViewMatcherException.Builder withOtherAmbiguousViews (View... others)
```

<br />

<br />

|       Parameters        ||
|----------|---------------|
| `others` | `View` <br /> |

|                                                                           Returns                                                                            ||
|------------------------------------------------------------------------------------------------------------------------------------------------------|--------|
| [AmbiguousViewMatcherException.Builder](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException.Builder) | <br /> |

### withRootView

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

<br />

<br />

|        Parameters         ||
|------------|---------------|
| `rootView` | `View` <br /> |

|                                                                           Returns                                                                            ||
|------------------------------------------------------------------------------------------------------------------------------------------------------|--------|
| [AmbiguousViewMatcherException.Builder](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException.Builder) | <br /> |

### withView1

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

<br />

<br />

|       Parameters       ||
|---------|---------------|
| `view1` | `View` <br /> |

|                                                                           Returns                                                                            ||
|------------------------------------------------------------------------------------------------------------------------------------------------------|--------|
| [AmbiguousViewMatcherException.Builder](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException.Builder) | <br /> |

### withView2

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

<br />

<br />

|       Parameters       ||
|---------|---------------|
| `view2` | `View` <br /> |

|                                                                           Returns                                                                            ||
|------------------------------------------------------------------------------------------------------------------------------------------------------|--------|
| [AmbiguousViewMatcherException.Builder](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException.Builder) | <br /> |

### withViewMatcher

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

<br />

<br />

|           Parameters            ||
|---------------|------------------|
| `viewMatcher` | `Matcher` <br /> |

|                                                                           Returns                                                                            ||
|------------------------------------------------------------------------------------------------------------------------------------------------------|--------|
| [AmbiguousViewMatcherException.Builder](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException.Builder) | <br /> |

-

  ## Interfaces

  - [EspressoException](https://developer.android.com/reference/android/support/test/espresso/EspressoException)
  - [FailureHandler](https://developer.android.com/reference/android/support/test/espresso/FailureHandler)
  - [IdlingResource](https://developer.android.com/reference/android/support/test/espresso/IdlingResource)
  - [IdlingResource.ResourceCallback](https://developer.android.com/reference/android/support/test/espresso/IdlingResource.ResourceCallback)
  - [UiController](https://developer.android.com/reference/android/support/test/espresso/UiController)
  - [ViewAction](https://developer.android.com/reference/android/support/test/espresso/ViewAction)
  - [ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion)
  - [ViewFinder](https://developer.android.com/reference/android/support/test/espresso/ViewFinder)
  - [ViewInteractionComponent](https://developer.android.com/reference/android/support/test/espresso/ViewInteractionComponent)
-

  ## Classes

  - [AmbiguousViewMatcherException.Builder](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException.Builder)
  - [DataInteraction](https://developer.android.com/reference/android/support/test/espresso/DataInteraction)
  - [DataInteraction.DisplayDataMatcher](https://developer.android.com/reference/android/support/test/espresso/DataInteraction.DisplayDataMatcher)
  - [Espresso](https://developer.android.com/reference/android/support/test/espresso/Espresso)
  - [IdlingPolicies](https://developer.android.com/reference/android/support/test/espresso/IdlingPolicies)
  - [IdlingPolicy](https://developer.android.com/reference/android/support/test/espresso/IdlingPolicy)
  - [IdlingRegistry](https://developer.android.com/reference/android/support/test/espresso/IdlingRegistry)
  - [NoMatchingViewException.Builder](https://developer.android.com/reference/android/support/test/espresso/NoMatchingViewException.Builder)
  - [PerformException.Builder](https://developer.android.com/reference/android/support/test/espresso/PerformException.Builder)
  - [Root](https://developer.android.com/reference/android/support/test/espresso/Root)
  - [Root.Builder](https://developer.android.com/reference/android/support/test/espresso/Root.Builder)
  - [ViewInteraction](https://developer.android.com/reference/android/support/test/espresso/ViewInteraction)
-

  ## Exceptions

  - [AmbiguousViewMatcherException](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException)
  - [AppNotIdleException](https://developer.android.com/reference/android/support/test/espresso/AppNotIdleException)
  - [IdlingResourceTimeoutException](https://developer.android.com/reference/android/support/test/espresso/IdlingResourceTimeoutException)
  - [InjectEventSecurityException](https://developer.android.com/reference/android/support/test/espresso/InjectEventSecurityException)
  - [NoActivityResumedException](https://developer.android.com/reference/android/support/test/espresso/NoActivityResumedException)
  - [NoMatchingRootException](https://developer.android.com/reference/android/support/test/espresso/NoMatchingRootException)
  - [NoMatchingViewException](https://developer.android.com/reference/android/support/test/espresso/NoMatchingViewException)
  - [PerformException](https://developer.android.com/reference/android/support/test/espresso/PerformException)