There are QAPlug plugins to manage code quality using PMD, Checkstyle and Findbugs.
Ref: http://qaplug.com/
They are also compatible for android studio.
Ref: http://qaplug.com/blog/qaplug-for-android-studio/
To add the QA plugins to android studio;
1-) Click File --> Setings
2-) Select 'Plugins' option from left menu.
3-) Click 'Browse repositories' button.
4-) Write 'QAPLug' keyword in the textbox which is searching plugin.
You will see QAPlug plugins like Checkstyle, FindBugs, Hammurapi and PMD..
5-) Select plugins whichever you want and install them.
6-) Click 'Apply' button and restart android studio.
You are ready to use plugins which are selected by your side.
To use these plugins;
7-) Select your code block or files which have your codes and Right Click --> Analyze --> Analyze Code
8-) At last, Click 'OK' button.
Selected plugins work and show you code analysis results on Analysis Tab.
More : https://qaplug.com/tutorial/