Error in Android game for onTouchEvent
<p>Can any one help me to remove this error on gePointerCount , getX() , getY()</p>

<p>Multiple markers at this line</p>

<ul>
<li>The method getPointerCount() is undefined for the type MotionEvent</li>
</ul>

<p>public boolean onTouchEvent(MotionEvent event)
   {
      float xPosition1 = 0;
      float yPosition1 = 0;
      float xPosition2 = 0;
      float yPosition2 = 0;</p>

<pre><code>  for (int pointerIndex = 0; pointerIndex &lt; event.getPointerCount(); pointerIndex++) //Error
  {
     if (pointerIndex == 0)
     {
        xPosition1 = event.getX(pointerIndex);// Error
        yPosition1 = event.getY(pointerIndex);//Error
     }

     if (pointerIndex == 1)
     {
        xPosition2 = event.getX(pointerIndex);//Error
        yPosition2 = event.getX(pointerIndex);/Error
     }
  }
</code></pre>
