Android 为什么在使用lambda表达式时会出现此编译器错误?

Android 为什么在使用lambda表达式时会出现此编译器错误?,android,android-studio,lambda,android-studio-2.2,Android,Android Studio,Lambda,Android Studio 2.2,最近,我根据将我的Nougat项目迁移到Java 8,并用lambda表达式替换了一些OnClickListener,但在构建apk时出现了以下错误: 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

最近,我根据将我的Nougat项目迁移到Java 8,并用lambda表达式替换了一些OnClickListener,但在构建apk时出现了以下错误:

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
我很怀疑我在Java中发现了bug。更有可能是我做错了什么。以前有人看到过此错误吗?

我使用的是Android Studio 2.2.1(支持lambdas),我尝试了附带的JDK和Oracle的最新版本1.8.0112。我的设备和模拟器都运行Android 7.0或更高版本


提前感谢…

参考@sasikumar无需帮助。实际上,这看起来像是编译器中的一个bug。即使你做错了什么,也应该有一条清晰的错误消息,而不是异常。请参阅@sasikumar No help。实际上,这看起来像是编译器中的一个bug。即使你做错了什么,也应该有明确的错误信息,而不是异常。