title: class 'Anonymous class derived from PlaceSelectedListener' must either be declared abstract or implement abstract method
body: <p>I'm trying to implement the google auto complete widget with some code from the Google website. I'm having one error on this line:</p>
  
  <pre><code>autocompleteFragment.setOnPlaceSelectedListener(new PlaceSelectionListener()
  </code></pre>
  
  <p>the error being:
  <strong><em>class 'Anonymous class derived from PlaceSelectedListener' must either be declared abstract or implement abstract method 'onError(Status)' in 'PlaceSelectionListener'</em></strong></p>
  
  <p>and the other error on this one:</p>
  
  <pre><code>@Override
  public void onError(AsyncTask.Status status
  </code></pre>
  
  <p>whereby the error is: <strong><em>Method does not override method from its superclass</em></strong></p>
  
  <p>Can I please get insight on how to solve these errors?</p>
  
  <pre><code>public class Preferences extends FragmentActivity  {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_preferences);
  
      final TextView text = (TextView)findViewById(R.id.textView3);
      final String TAG = Preferences.class.getSimpleName();
  
  
      PlaceAutocompleteFragment autocompleteFragment = (PlaceAutocompleteFragment)
              getFragmentManager().findFragmentById(R.id.place_autocomplete_fragment);
  
      autocompleteFragment.setOnPlaceSelectedListener(new PlaceSelectionListener() {
          @Override
          public void onPlaceSelected(Place place) {
              // TODO: Get info about the selected place.
              Log.i(TAG, "Place: " + place.getName());
  
              String placeDetailsStr = place.getName() + "\n"
                      + place.getId() + "\n"
                      + place.getLatLng().toString() + "\n"
                      + place.getAddress() + "\n"
                      + place.getAttributions();
              text.setText(placeDetailsStr);
          }
  
         @Override
          public void onError(AsyncTask.Status status) {
              // TODO: Handle the error.
              Log.i(TAG, "An error occurred: " + status);
          }
      });
  
  
  }
  </code></pre>
  
  <p>}</p>