[英]Unable to deploy to Google App Engine : java.lang.IllegalArgumentException: Class file is Java 8 but max supported is Java 7
Got this error while trying to setup Firebase Admin SDK 尝试设置Firebase Admin SDK时出现此错误
Preparing to deploy: Created staging directory at: 'C:\\Users\\Parag\\AppData\\Local\\Temp\\appcfg4808135439637212840.tmp' java.lang.IllegalArgumentException: Class file is Java 8 but max supported is Java 7: com/google/firebase/FirebaseApp$1.class in G:_work\\testproject\\war\\WEB-INF\\lib\\firebase-admin-4.0.0.jar
准备部署:创建的临时目录位于:'C:\\ Users \\ Parag \\ AppData \\ Local \\ Temp \\ appcfg4808135439637212840.tmp'java.lang.IllegalArgumentException:类文件是Java 8但最大支持是Java 7:com / google / firebase G中的/FirebaseApp$1.class:_work \\ testproject \\ war \\ WEB-INF \\ lib \\ firebase-admin-4.0.0.jar
App Engine SDK version: 1.9.34 App Engine SDK版本:1.9.34
Eclipse version: Neon.1a Release (4.6.1) Eclipse版本:Neon.1a版本(4.6.1)
Java Compiler Version Set to 1.7 Java编译器版本设置为1.7
Have anyone encountered this error, please help 有没有人遇到过这个错误,请帮忙
It seems like this is a known issue based on their release notes for firebase-admin version 4.0.0 (November 7, 2016) and version 4.0.1 (November 8, 2016): 根据firebase-admin版本4。0。0(2016年11月7日)和版本4。0。1(2016年11月8日)的发行说明 ,这似乎是一个已知问题:
ISSUE: This version was compiled for Java 8 and does not support Java 7. This will be fixed in an upcoming release.
问题:这个版本是为Java 8编译的,不支持Java 7.这将在即将发布的版本中修复。
I guess we'll have to wait ;) 我想我们得等;)
UPDATE: 更新:
As per their release notes , it is now fixed in version 4.0.2 - November 15, 2016: 根据他们的发行说明 ,它现在已在4.0.2版本 - 2016年11月15日修复:
FIXED This update restores Java 7 compatibilty for the Admin Java SDK.
已修复此更新为Admin Java SDK恢复Java 7兼容性。
At this time, it appears as though the firebase-admin-sdk is intended to be used on the Google Flexible Environment instead of the Standard Environment. 此时,似乎firebase-admin-sdk旨在用于Google Flexible Environment而不是Standard Environment。
https://cloud.google.com/appengine/docs/flexible/java/flexible-for-standard-users https://cloud.google.com/appengine/docs/flexible/java/flexible-for-standard-users
A comparable package for the Standard Environment would be firebase-server-sdk. 标准环境的可比包是firebase-server-sdk。
https://mvnrepository.com/artifact/com.google.firebase/firebase-server-sdk https://mvnrepository.com/artifact/com.google.firebase/firebase-server-sdk
However, references to the original server sdk documentation now forward to the admin sdk documentation. 但是,对原始服务器sdk文档的引用现在转发到admin sdk文档。 So, perhaps they will release an update to the Standard Environment that supports Java 8, or an update to the admin sdk that works on Java 7.
因此,他们可能会发布支持Java 8的标准环境的更新,或者对Java 7上运行的admin sdk的更新。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.