GreenDao配置gradle都没问题,但是定义实体类添加@Entity的时候编译总会报

Found 2 problem(s) parsing "D:\study\imooc_music_app-master\GreenDaoDemo\app\src\main\java\com\sjfy\greendaodemo\PhoneBean.java":
#1 @1: Pb(324) The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files (ID: 16777540; error: true)
#2 @10: Pb(140) Implicit super constructor Object() is undefined for default constructor. Must define an explicit constructor (ID: 134217868; error: true)FAILURE: Build failed with an exception.* What went wrong:
Execution failed for task ':app:greendao'.
> Found 2 problem(s) parsing "D:\study\imooc_music_app-master\GreenDaoDemo\app\src\main\java\com\sjfy\greendaodemo\PhoneBean.java". First problem:Pb(324) The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files (16777540 at line 1).Run gradle with --info for more details.* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.* Get more help at https://help.gradle.org

找了几个小时才发现是jdk不匹配的问题,
如下图打上勾即可:

GreenDao定义@Entity编译出错相关推荐

  1. 由一次奇怪的编译出错想起的

    现象 最近在工作中遇到了一次奇怪的编译出错.事情是这样的,本来这个asp.net webform应用是可以编译的.但是将另外一个class library的工程加入到这个asp.net webform ...

  2. saki4510t的UVCCamera设置匹配android7.1.1 sdk等信息后编译出错

    采用的代码来之于https://github.com/saki4510t/UVCCamera 此工程Sdk等版本信息定义 1.1 minSdkVersion 1.2 targetSdkVersion ...

  3. 使用友元,编译出错fatal error C1001: INTERNAL COMPILER ERROR (compiler file 'msc1.cpp', line 1786) 的解决...

    版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明 http://lihuan-dianxian.blogbus.com/logs/42102230.html 同学拿了个很简单的小程序过 ...

  4. CCF-CSP:编译出错

    在刷CSP题目的时候,写的代码在Visual Studio 2019编译通过且可以正常运行,但是提交显示编译出错.        在Windows平台使用g++编译也正常通过.        考虑到C ...

  5. make编译出错Relocations in generic ELF (EM: 62)

    参考:编译出错Relocations in generic ELF (EM: 62) main.o: Relocations in generic ELF (EM: 62) 错误信息是: 通过查看文件 ...

  6. cmake编译出错:No CMAKE_CXX_COMPILER could be found.

    cmake编译出错:No CMAKE_CXX_COMPILER could be found. 错误类似: -- The CXX compiler identification is unknown- ...

  7. Xamarin.iOS编译出错

    Xamarin.iOS编译出错 错误信息:C:/Program Files(x86)/Reference Assemblies/Microsoft/Framework/Xamarin.iOS/v1.0 ...

  8. 编译出错libicui18n.so.58: undefined reference to `__cxa_throw_bad_array_new_length@CXXABI_1.3.8‘

    编译出错libicui18n.so.58: undefined reference to `__cxa_throw_bad_array_new_length@CXXABI_1.3.8' 环境 Ubun ...

  9. android 模块不编译错误,Android 编译出错版本匹配问题解决办法

    Android 编译出错版本匹配问题解决办法 解决问题的关键在于版本匹配, compileSdkVersion compileSdkVersion targetSdkVersion 这三个参数的整数值 ...

最新文章

  1. pytorch CrossEntropyLoss用法
  2. 一文读懂常用日志框架(Log4j、SLF4J、Logback)有啥区别
  3. 在 .NET Core 中使用 DiagnosticSource 记录跟踪信息
  4. Python爬虫_Cookie
  5. ASCLL编码详解,ASCLL编码对照表
  6. 登量子位“AI领航企业榜单”,联想用实力说话
  7. android计算汇率代码,android studio 开发实例 连接网络获取汇率
  8. python 判断字符串是否为数字_Python核心知识系列:数字与字符串类型
  9. 【语言处理与Python】5.7如何确定一个词的分类
  10. android webview 文件下载,Android编程使用WebView实现文件下载功能的两种方法
  11. 小码哥C++:第一课
  12. 转载:一名程序员的磨练
  13. 5个流行的开源HIDS系统介绍
  14. ubuntu18.10安装网易云音乐,并解决网易云音乐图标无法启动的问题
  15. 防火墙/入侵防护系统IPS
  16. 【JAVA】贪吃蛇的初步实现(一)
  17. 数字电路和模拟电路-5组合逻辑电路分析与设计
  18. NUC972 使用不同的FLASH开机的ENV文件写法 NAND...
  19. 微信撤回消息服务器还有存底么,微信更新又来了,撤回消息大变化!还增加“查岗”功能......
  20. android Bitmap 处理踩坑记

热门文章

  1. 如何隐藏Android模拟器下方的虚拟按键(隐藏模拟器属性即可)
  2. ZoomIt 屏幕缩放演示软件 使用
  3. 【每日一知】带你走近5nm芯片 (2021.02.05 )
  4. 史上最强大的华为Mate40系列:全球唯一5nm 5G SoC,顶配超1.8万元!
  5. 川崎机器人零点调整_机器人零点标定方法
  6. 自己动手做QQ空间音乐的链接
  7. java小demo文件分割器
  8. 小木的智慧屋--微信公众号的推广案例分析(1)
  9. HP1213tx笔记本电脑不触发维修
  10. FLAC3D可视化后处理matlab,FLAC3D模型应力的Surfer可视化后处理.pdf