Why do I get this compiler error when I use lambda expressions?
<p>I recently migrated my Nougat project to Java 8 per the <a href="https://developer.android.com/guide/platform/j8-jack.html" rel="nofollow">official instructions</a> and replaced some OnClickListeners with lambda expressions, but I get this error when I build the apk:</p>

<pre><code>An exception has occurred in the compiler (1.8.0_112). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program and the following diagnostic in your report. Thank you.
com.sun.tools.javac.code.Symbol$CompletionFailure: class file for java.lang.invoke.MethodType not found
:keyboardLib:compileDebugJavaWithJavac FAILED
</code></pre>

<p><strong>I seriously doubt I found a bug in Java. More likely I'm doing something wrong. Has anyone see this error before?</strong></p>

<p>I'm using Android Studio 2.2.1 (which supports lambdas) and I tried both the included JDK and also the very latest from Oracle, 1.8.0_112. My devices and emulators are all running Android 7.0 or higher.</p>

<p>Thanks in advance...</p>