将Codename One Project更新为JDK 8导致编译错误

Update Codename One Project to JDK 8 Results In Compilation Error

我已经将我的项目更新到 JDK 8.

这对 IOS 没问题,但是在为 Android 构建时发生以下错误。

BUILD FAILED

/home/ec2-user/android-sdk/tools/ant/build.xml:871: Can't read [/tmp/build1790297227904368708xxx/Main/libs/userClasses.jar] (Can't process class [generated/StateMachineBase.class] (Unsupported class version number [52.0] (maximum 51.0, Java 1.7)))

确保在项目属性中设置 java.version=8 构建提示。