I found a free pluggin that can generate class diagrams with android studio. It's calledSimpleUML.
On Mac: go to Android Studio
-> Preferences
-> Plugins
On Windows: go to Android Studio
-> File
-> Settings
-> Plugins
Click on Browse repositories...
and search for SimpleUMLCE (CE means Community Edition, this is what android studio is based on).
Install it, restart, then you can do a right click on the folder containing the classes you want to visualize, and select Add to simpleUML Diagram
.
That's it, you have you fancy class diagram generated from your code!
---------------------------------------------------------------------------------
说了这么多,就是在AS装插件即可:SimpleUMLCE
只要在需要生成类图的类上点右键选择Add to simpleUML Diagram
即可
原文:http://stackoverflow.com/questions/17123384/how-to-generate-class-diagram-uml-on-android-studio