title: How to use Lambda (java.util.function, java.util.stream) for Api Level below 24?
body: <p>I found several questions similar but no solution to my problem.</p>
  
  <p><strong>What I tried</strong>:</p>
  
  <ul>
  <li>I have written several methods that uses lambda with
  'java.util.function' and 'java.util.stream' (I use it in my Java
  application server side, on Windows)</li>
  <li>I STRONGLY NEED to use them in Android app (client side)</li>
  <li>I updated to Android Studio 3.0</li>
  <li>I configured build.gradle for java1.8, etc..., as required in "<a href="https://developer.android.com/studio/write/java8-support.html" rel="nofollow noreferrer">https://developer.android.com/studio/write/java8-support.html</a>", where it is also written that 'java.util.function' and 'java.util.stream' are available with api level >= 24</li>
  <li>I tried enabling jack option, but I have to disable, because during compiling Android Studio gives me error and says me to disable jack option.</li>
  <li>I STRONGLY NEED compatibility with api level lower than 24: minSdkVersion 15</li>
  </ul>
  
  <p><strong>Problem</strong></p>
  
  <ul>
  <li>The compiling in Android Studio is OK, but when the app is installed on mobile with Api&lt;24 I get a lot of errors in logcat and the app is not runned: example of errors:
  
  <ul>
  <li>12-26 10:59:14.245 6709-6709/? W/dalvikvm: Link of class 'LVarie/Utilities_Per_Cache$$Lambda$5;' failed</li>
  <li>12-26 10:59:14.245 6709-6709/? W/dalvikvm: VFY: unable to resolve static field 2526 ($instance) in LVarie/Utilities_Per_Cache$$Lambda$5;</li>
  <li>etc....</li>
  </ul></li>
  </ul>
  
  <p><strong>Question:</strong></p>
  
  <ul>
  <li>How can I do when the Android device has api level &lt; 24 (most of my users have mobiles with api level &lt; 24) ? </li>
  <li>I understood, googling, that jack option (or retrolamda library) allows to use 'java.util.function' and 'java.util.stream', so is there a way to say  (I suppose inside gradle.build): if api level is &lt;=24 use jack option?</li>
  </ul>