greenrobot / greenDAO

greenDAO is a light & fast ORM solution for Android that maps objects to SQLite databases.
http://greenrobot.org/greendao/
12.63k stars 2.89k forks source link

Lambda 表达式报错 #1109

Open 1759122600 opened 1 year ago

1759122600 commented 1 year ago

在使用@Entity的实体类中使用Lambda,编译的时候会报错 Found 1 problem(s) parsing "D:\packager\**_3000\app\src\main\java\com\kgzn\**\bean\StickersBean.java". First problem: Pb(645) Lambda expressions are allowed only at source level 1.8 or above (1610613381 at line 184). Run gradle with --info for more details.

1759122600 commented 1 year ago

Using Lambda in an entity class that uses @entity will cause an error at compile time Found 1 problem(s) parsing "D:\packager\**_3000\app\src\main\java\com\kgzn\**\bean\StickersBean.java". First problem: Pb(645) Lambda expressions are allowed only at source level 1.8 or above (1610613381 at line 184). Run gradle with --info for more details.

greenrobot-team commented 1 year ago

Note that greenDAO will not receive any updates in the foreseeable future.

Anyhow, check that you are using greenDAO 3.3.0. It should support Java 8 language features such as lambdas.