title: have an android error with a game
body: <p>Okay guys,my problem is that..all i want is that..where the user touch with the finger,there the spaceship will go in my game,which is in portrait game.</p>
  
  <pre><code>int a = player.getX();    
  int b = player.getY();
  
  @Override
  public boolean onTouch(View v, MotionEvent event) {
  
      switch (event.getAction())
      {
          case MotionEvent.ACTION_DOWN:
              a = (int) event.getX();
              b = (int) event.getY();
              break;
      }
  
      return true;
  }
  </code></pre>
  
  <p>I tried that..but it is giving me java.NullPointerException or something like that at: int a = player.getX();
      int b = player.getY();
  Player is the class of the playership and those methods take the x and y of the ship,the position.</p>