参考文档: http://softwaredevgeek.blogspot.com/2013/11/setting-up-android-checkstyle-in.html
步骤:
1.https://github.com/android/platform_development/blob/master/ide/intellij/codestyles/AndroidStyle.xml
2.创建文件AndroidStyle.xml.将1中的内容复制到文件中,并将AndroidStyle.xml复制到
~/.AndroidStudio/config/codestyles/
3.在Settings(or Preferences in Mac OS X) > Code Style > Java, 选择AndroidStyle,同时CodeStyle > XML , 选择AndroidStyle.
4.重启androidstudio, 执行菜单--> InspectCode.
更多参考文档:
http://www.thinksaas.cn/group/topic/349857/
http://www.cnblogs.com/liugang/archive/2010/10/26/1860903.html
http://www.cnblogs.com/qianxudetianxia/archive/2012/01/01/2309102.html
gradle 配置checkStyle:
http://blog.csdn.net/forlong401/article/details/42077013
http://gradle.org/docs/current/dsl/org.gradle.api.plugins.quality.Checkstyle.html