现在的位置: 首页 > 综合 > 正文

Android Eclipse 开发配置

2014年11月11日 ⁄ 综合 ⁄ 共 845字 ⁄ 字号 评论关闭

Android 开发Eclipse的几个配置项说明

1.Windows->preferences->Java->Formatter: Import->从你源码工程的jellybean4.2.2/development/ide/eclipse选择android-formattings-35.xml
这样在格式化代码的时候就会按照Google的官方规范格式化代码

2.Windows->preferences->Java->Organize Imports: Import->从你源码工程的jellybean4.2.2/development/ide/eclipse选择android.importorder
这样在保存代码的时候就会对你的import的包的顺序进行重新排列。

3.还要装一个插件:AnyEdit,目的是进行空格和TAB键的转换。安装完毕后,在windows->preferences->General->Editors->AnyEdit Tools
    Convert tabs<->spaces: 选择Tabs to spaces,这样就会把tab键都转换为空格键。

4.要想自动执行上面的几步,还要做一个操作: 保存时执行format code & organize import  动作

  window --> preferences --> java --> Editor --> Save Actions

  选中 Perform the selected actions on save 

  选中 Format source code

  选中 organize imports

  这样,在保存时就能够执行 SHIFT+CTRL+O 和 CTRL+SHIFT+F


5. FindBugs是一款Java静态代码分析工具,不过我没安装,应该是有用的。

http://blog.csdn.net/strawbingo/article/details/5924005

http://blog.csdn.net/xiazdong/article/details/7995854

    


抱歉!评论已关闭.