问题:
Unable to load class ‘javax.annotation.Generated’.

This is an unexpected error. Please file a bug containing the idea.log file.

分析:
缺少annotation依赖或者annotation里没有Generated

解决:
方法1:使用Java1.8即可,我用的是java11
方法2:引入annotation的jar
方法3:升级dagger到2.35以上,因为我是dagger2那里用了这个,升级完之后Generated有了,但是没有Inject,于是又升级了gradle及其插件到7.0.2

Logo

技术共进,成长同行——讯飞AI开发者社区

更多推荐