title: In Espresso, how to avoid AmbiguousViewMatcherException when multiple views match
body: <p>Having gridView which has some images. The gridView's cell comes out from same predefined layout, which has same id and desc.</p>
  
  <blockquote>
    <p>R.id.item_image == 2131493330</p>
  </blockquote>
  
  <pre><code>onView(withId(is(R.id.item_image))).perform(click());
  </code></pre>
  
  <p>Since all cells in the grid have same id, it got <code>AmbiguousViewMatcherException</code>.
  How to just pick up first one or any of one of them?
  Thanks!</p>
  
  <blockquote>
    <p>android.support.test.espresso.AmbiguousViewMatcherException: 'with id: is &lt;2131493330>' matches multiple views in the hierarchy.
    Problem views are marked with '****MATCHES****' below.</p>
    
    <p>+------------->ImageView{id=2131493330, res-name=item_image, desc=Image, visibility=VISIBLE, width=262, height=262, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0} ****MATCHES****</p>
    
    <p>+------------->ImageView{id=2131493330, res-name=item_image, desc=Image, visibility=VISIBLE, width=262, height=262, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0} ****MATCHES****
    |</p>
  </blockquote>