android 常见问题

来源:互联网 发布:php __callstatic 编辑:程序博客网 时间:2024/05/22 03:07

EEROR1:Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tool

1.项目右键 ->android tools->Fix Project

2.如果不可以,检查Project->Properties->Java Compiler

确认JDK compliance被设置为1.6,并且enable specific seetings.

经过这两步问题基本解决。

 

EEROR2:

在更新Android SDK后,经常会遇到一个 “SDK Manager:failed to install” “Tools Can't Write” 之类的说Tools文件不能写的错误。如果安装过程中提示“SDK Manager:failed to install”,不要急,先退出,然后
1.进入sdk的temp文件夹,会有一个下载好的tools_r06-windows.zip(名字可能有一点不一样)
2.解压此文件,出现tools_r06-windows文件夹
3.进入,直接将tools_r06-windows里的所有文件复制并覆盖掉sdk根目录的tools文件夹中的文件

EEROR3:Syntax error, annotations are only available if source level is 1.5

 

You can do that at Window > Preferences > Java > Compiler for the entire workspace or on a project by project bases by right clicking in the Package Explorer view and selecting Properties > Java Compiler .

备注 :如果现在Eclipse中设置的JRE是1.6,出现了如上的错误。先从preferences里把JRE改成1.5,rebuild, 然后再改回1.6就没有错误了。

原创粉丝点击