title: Android Place Autocomplete Fragment closing on its own
body: <p>I am trying to implement place autocomplete fragment for the first time and facing one issue with it.When ever i starts to type, after first letter it starts searching and instead of showing the results its (fragment) just disappears..
  insted that i am getting is
  Status{statusCode=PLACES_API_ACCESS_NOT_CONFIGURED, resolution=null}</p>
  <p><strong>Manifest.xml</strong></p>
  <pre><code>  &lt;meta-data
              android:name=&quot;com.google.android.geo.API_KEY&quot;
              android:value=&quot;Axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx4&quot; /&gt;
  </code></pre>
  <p><strong>Xml_layout</strong></p>
  <pre><code>&lt;TextView
      android:text=&quot;TextView&quot;
      android:layout_width=&quot;wrap_content&quot;
      android:layout_height=&quot;wrap_content&quot;
      android:layout_alignParentTop=&quot;true&quot;
      android:layout_marginTop=&quot;14dp&quot;
      android:id=&quot;@+id/Area&quot;
      android:onClick=&quot;Onselection&quot;
      android:layout_alignParentEnd=&quot;true&quot;
      android:layout_alignParentStart=&quot;true&quot; /&gt;
  &lt;fragment
          android:id=&quot;@+id/place_autocomplete_fragment&quot;
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:name=&quot;com.google.android.gms.location.places.ui.PlaceAutocompleteFragment&quot;
          android:layout_below=&quot;@+id/Area&quot;
          android:layout_alignParentStart=&quot;true&quot; /&gt;
  </code></pre>
  <p><strong>Class</strong></p>
  <pre><code>public class test extends AppCompatActivity implements PlaceSelectionListener {
  
  
      private static final String LOG_TAG = &quot;PlaceSelectionListener&quot;;
      private static final LatLngBounds BOUNDS_MOUNTAIN_VIEW = new LatLngBounds(
              new LatLng(-85, -180), new LatLng(85, 180));
      private static final int REQUEST_SELECT_PLACE = 1000;
      TextView locationtext ;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_testtttt);
          locationtext = (TextView) findViewById(R.id.Arear) ;
  
          PlaceAutocompleteFragment autocompleteFragment = (PlaceAutocompleteFragment)
                  getFragmentManager().findFragmentById(R.id.place_autocomplete_fragment);
  
          autocompleteFragment.setOnPlaceSelectedListener(this);
  
          AutocompleteFilter typeFilter = new AutocompleteFilter.Builder()
                  .setTypeFilter(AutocompleteFilter.TYPE_FILTER_ADDRESS)
                  .build();
          autocompleteFragment.setFilter(typeFilter);
  
  
      }
  
  
      public  void Onselection(View v)
      {
          try {
              Intent intent = new PlaceAutocomplete.IntentBuilder
                      (PlaceAutocomplete.MODE_OVERLAY)
                      .setBoundsBias(BOUNDS_MOUNTAIN_VIEW)
                      .build(testtttt.this);
              startActivityForResult(intent, REQUEST_SELECT_PLACE);
          } catch (GooglePlayServicesRepairableException |
                  GooglePlayServicesNotAvailableException e) {
              e.printStackTrace();
          }
      }
  
  
      @Override
      public void onPlaceSelected(Place place) {
  
      }
  
      @Override
      public void onError(Status status) {
  
      }
  </code></pre>
  <p><strong>On click fragment appears</strong></p>
  <p><img src="https://i.stack.imgur.com/FhAb1.png" alt="ScreenShot" /></p>
  <p><strong>fragment disappears/closed on its own</strong></p>
  <p><img src="https://i.stack.imgur.com/AgXHj.png" alt="ScreenShot" /></p>