title: Couldn't connect to Google API client
body: <p>I can't fetch last known location.
  I have enabled <strong>Geocoding API</strong> and <strong>Google Places API for Android</strong> in google console.
  I added api key to manifest file:</p>
  
  <pre><code>&lt;meta-data
      android:name="com.google.android.gms.version"
      android:value="@integer/google_play_services_version" /&gt;
  &lt;meta-data
      android:name="com.google.android.geo.API_KEY"
      android:value="@string/google_api_key" /&gt;
  </code></pre>
  
  <p>but I keep getting a message in the console: "<strong>Couldn't connect to Google API client: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null}</strong>"</p>
  
  <hr>
  
  <p><strong>UPDATE</strong></p>
  
  <p><a href="https://developer.android.com/training/location/retrieve-current.html">I use google sample</a></p>
  
  <pre><code>protected synchronized void buildGoogleApiClient() {
      mGoogleApiClient = new GoogleApiClient.Builder(this)
              .addConnectionCallbacks(this)
              .addOnConnectionFailedListener(this)
              .addApi(LocationServices.API)
              .build();
  }
  
  @Override
  public void onConnected(Bundle connectionHint) {
      Location mLastLocation = LocationServices.FusedLocationApi.getLastLocation(
              mGoogleApiClient);
      if (mLastLocation != null) {
          Toast.makeText(this, "Latitude = " + mLastLocation.getLatitude() + "\n" +
                  "Longitude = " + mLastLocation.getLongitude(), Toast.LENGTH_LONG).show();
      }
  }
  
  @Override
  public void onConnectionFailed(ConnectionResult connectionResult) {
      Toast.makeText(this, connectionResult.toString(), Toast.LENGTH_LONG).show();
  }
  </code></pre>
  
  <p><strong>onConnected</strong> and <strong>onConnectionFailed</strong> do not call.</p>
  
  <p>And also I use <a href="https://github.com/mcharmas/Android-ReactiveLocation">Android-ReactiveLocation</a>
  but both methods are output to the console: <strong>Couldn't connect to Google API client: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null}</strong></p>