title: Android Studio: lambda does not work
body: <p>When trying to use lambda expressions, I got some Gradle build errors:</p>
  
  <blockquote>
    <p>Error:(41, 100) error: lambda expressions are not supported in -source 1.7
    (use -source 8 or higher to enable lambda expressions)</p>
    
    <p>Error:Execution failed for task ':app:compileDebugJava'.
    Compilation failed; see the compiler error output for details.</p>
  </blockquote>
  
  <p>A quick search helped me understand that lambda expressions are only supported at JDK 1.8, and apparently I am not using it.</p>
  
  <p>My problem is that JDK 1.8 does install on my computer (I am using Yosemite), In module setting → SDK Location → JDK Location it says:</p>
  
  <p><img src="https://i.stack.imgur.com/IcLwV.png" alt="JDK location screenshot"></p>
  
  <p>But in Settings module → app → Source/Target Compatibility, there is not an option such as "1.8", there are only options for Java 1.6 or 1.7.</p>
  
  <p><img src="https://i.stack.imgur.com/qvJaF.png" alt="Source/Target Compatibility screenshot"></p>
  
  <p>I know I can manage without anonymous functions, but I still want to fix this issue.</p>