title: Call requires API level 26 (current min is 23): java.time.Instant#now
body: <p>I'm implementing <a href="https://developers.google.com/maps/documentation/directions/start" rel="noreferrer">Google's Directions API</a>. My app supports <code>minSdkVersion 23</code> and <code>java.time.Instant</code> is not supported here.</p>
  
  <p>Is there a solution for this, or should i just check for user's version and allow this functionality if it's version is supported?</p>
  
  <pre><code>    DirectionsResult directionsResult = DirectionsApi.newRequest(geoApiContext)
              .mode(TravelMode.DRIVING)
              .origin(new com.google.maps.model.LatLng(mapFragment.getUserCoords().latitude, mapFragment.getUserCoords().longitude))
              .destination(tabHandlerCommunication.destinationBarCoords)
              .departureTime(Instant.now()) // &lt;-- error here
              .await();
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>Call requires API level 26 (current min is 23): java.time.Instant#now
    less... (Ctrl+F1)  Inspection info:This check scans through all the
    Android API calls in the application and warns about any calls that
    are not available on all versions targeted by this application
    (according to its minimum SDK attribute in the manifest).  If you
    really want to use this API and don't need to support older devices
    just set the minSdkVersion in your build.gradle or AndroidManifest.xml
    files.  If your code is deliberately accessing newer APIs, and you
    have ensured (e.g. with conditional execution) that this code will
    only ever be called on a supported platform, then you can annotate
    your class or method with the @TargetApi annotation specifying the
    local minimum SDK to apply, such as @TargetApi(11), such that this
    check considers 11 rather than your manifest file's minimum SDK as the
    required API level.  If you are deliberately setting android:
    attributes in style definitions, make sure you place this in a
    values-vNN folder in order to avoid running into runtime conflicts on
    certain devices where manufacturers have added custom attributes whose
    ids conflict with the new ones on later platforms.  Similarly, you can
    use tools:targetApi="11" in an XML file to indicate that the element
    will only be inflated in an adequate context.  Issue id: NewApi</p>
  </blockquote>