title: Lint is giving error if I use java.lang.Iterable#forEach in android code
body: <p>In my android code (Kotlin) I am using forEach method of java iterable.</p>
  <pre><code>mandatoryViews.forEach { view -&gt;
     // my code here
  }
  </code></pre>
  <p>Below is my sdk config in build.gradle (app):</p>
  <pre><code>minSdkVersion 23
  targetSdkVersion 30
  </code></pre>
  <p>Now my code builds fine. I also tried to run it on API 23 pixel device and everything is working fine.</p>
  <p>But after I run <code>gradlew lint</code> to see lint errors, it fails and report gives me this error:
  <code>Call requires API level 24 (current min is 23): java.lang.Iterable#forEach</code></p>
  <p><a href="https://i.stack.imgur.com/L16KJ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/L16KJ.png" alt="lint error" /></a></p>
  <p>Not able to figure why does lint think it will not work on API 23 whereas on API 23 device my code is running fine.</p>