之前初次进行Android源码开发时,用Eclipse作为编辑器,结果提交代码打patch时完全不合格。这是由于eclipse的格式没有配置好,刚开始在那里一个一个的手动配置,很是麻烦,最后了解到直接引入google Android源码的编码风格即可,非常方便。
设置android编码格式与Android源码一致,andorid源码编码格式以及引入包规则在源码根目录---development---ide---eclipse下两个文件。
导入方式如下:
1.在window->preferences->java->Code style->Formatter中导入android-formatting.xml
2.在window->preferences->java->Code style->Organize Imports中导入android.importorder