编译错误-com.android.dx.cf.iface.ParseException,Dx unsupported class file version 52.0 …while parsing
2016-11-15 10:39
609 查看
Dx unsupported class file version 52.0 …while parsing
最近在项目中遇到如上两个错误,解决方案:
右击项目名称 -> Properties -> Java Build Path
取消Order and Export标签下Android Private Libraries 和 Android Dependencies选项的勾选;
Order and Export有两个属性,调用优先级的问题,越在上边调用优先级越高。例如,在同包同类名的情况下,将优先从上到下执行搜索调用,打勾与不打勾的区别在于导出jar包时是否将这个库的内容也打包到jar中,勾为包含,不勾为不包含。
解决方案:
网友提供的方案
如果使用eclipse时遇到如标题的问题
原因是jdk版本是1.8,runtime版本是1.6,导致无法正常解析
eclipse修改设定
Window->Preference->Java->Compiler
Window->Preference->Java->Installed JREs
两处保持一致版本
Installed JREs->Execution Environment中
JavaSE-1.6选择Compatible JREs选择jdk 1.6
JavaSE-1.8选择Compatible JREs选择jdk 1.8
重启eclipse后运行生效,问题解决。
最近在项目中遇到如上两个错误,解决方案:
右击项目名称 -> Properties -> Java Build Path
取消Order and Export标签下Android Private Libraries 和 Android Dependencies选项的勾选;
Order and Export有两个属性,调用优先级的问题,越在上边调用优先级越高。例如,在同包同类名的情况下,将优先从上到下执行搜索调用,打勾与不打勾的区别在于导出jar包时是否将这个库的内容也打包到jar中,勾为包含,不勾为不包含。
解决方案:
网友提供的方案
如果使用eclipse时遇到如标题的问题
原因是jdk版本是1.8,runtime版本是1.6,导致无法正常解析
eclipse修改设定
Window->Preference->Java->Compiler
Window->Preference->Java->Installed JREs
两处保持一致版本
Installed JREs->Execution Environment中
JavaSE-1.6选择Compatible JREs选择jdk 1.6
JavaSE-1.8选择Compatible JREs选择jdk 1.8
重启eclipse后运行生效,问题解决。
相关文章推荐
- com.android.dx.cf.iface.ParseException: bad class file magic (cafebabe) or version (0034.0000)
- Caused by: com.android.dx.cf.iface.ParseException: bad class file magic (cafebabe) or version (0034.
- com.android.dx.cf.iface.ParseException: bad class file magic (cafebabe) or version (0034.0000)
- 【Android-I】Android开发之常见错误:Dx unsupported class file version 52.0...while parsing com/...
- 【Android-I】Android开发之常见错误:Dx unsupported class file version 52.0...while parsing com/...
- 编译错误: Dx unsupported class file version 52.0。。。
- com.android.dx.cf.iface.ParseException: class name (...) does not match path(...)
- android 编译错误 com/android/dx/command/dexer/Main : Unsupported major.minor version 52.0
- Eclipse编译错误: Dx unsupported class file version 52.0
- Android异常 Eclipse编译应用时出现 com.android.dx.cf.iface.parseexception
- 【Android】Dx unsupported class file version 52.0
- ant构建异常UNEXPECTED TOP-LEVEL EXCEPTION com.android.dx.cf.iface.ParseException解决
- ant构建异常UNEXPECTED TOP-LEVEL EXCEPTION com.android.dx.cf.iface.ParseException解决
- Dx unsupported class file version 52.0 …while parsing
- com.android.dx.cf.iface.ParseException
- 关于com.android.dx.cf.iface.ParseException
- 如何解决Eclipse开发android程序的编译错误:com/android/dx/command/dexer/Main : Unsupported major.minor version 52.0?
- Android 开发问题解决方法记录:Dx unsupported class file version 52.0
- Eclipse 编译Android项目出错 com/android/dx/command/dexer/Main : Unsupported major.minor version 52.0
- 错误:Dx unsupported class file version 52.0(解决)