运行程序报错:
Errors occurred during the build.
Errors running builder 'Android Package Builder' on project 'TestNative6'.
Errors occurred during the build.
Errors running builder 'Android Package Builder' on project 'TestNative6'.
com/android/dx/command/dexer/Main : Unsupported major.minor version 52.0
上网查资料说出现该警告是因为用高版本编译的文件在低版本的java运行,检查方式有下面几种:
1、设置Java Build Path和Java Compliance的JDK版本一致---------我设置Java Compliance为1.8之后,会报错误
Android requires compiler compliance level 5.0 or 6.0. Found '1.8' instead. Please use Android Tools > Fix Project Properties.
2、怀疑java和javac运行的版本不一致. 使用命令查看javac和java的版本(javac -version和java -version) ----------我的是一致的
最后手工修改myeclipse.ini文件中-vm为jdk1.8解决问题