title: How to check metrics of code (Lines of Code, Lines of Dead Code, Cyclomatic Complexity, ...) in Android Studio
body: <p>I have a some problem with calculating metrics of my code in Android Studio. I found Metrics Reloaded, but my Android Studio can not work with them (it's always showing me an error when loading this plugin).</p>
  
  <p>On Google search I don't found any different plugins or something similar. Is there anything else or would anyone know where there might be a mistake? </p>
  
  <p>Error:</p>
  
  <blockquote>
    <p>class with name 'com.sixrr.metrics.plugin.ProjectMetricsAction' cannot
    be loaded [Plugin: MetricsReloaded]
    com.intellij.diagnostic.PluginException: class with name
    'com.sixrr.metrics.plugin.ProjectMetricsAction' cannot be loaded
    [Plugin: MetricsReloaded]     at
    com.intellij.openapi.actionSystem.impl.ActionManagerImpl.error(ActionManagerImpl.java:186)
      at
    com.intellij.openapi.actionSystem.impl.ActionManagerImpl.convertStub(ActionManagerImpl.java:151)
      at
    com.intellij.openapi.actionSystem.impl.ActionManagerImpl.getActionImpl(ActionManagerImpl.java:481)
      at
    com.intellij.openapi.actionSystem.impl.ActionManagerImpl.getAction(ActionManagerImpl.java:469)
      at
    com.intellij.openapi.actionSystem.DefaultActionGroup.unStub(DefaultActionGroup.java:347)
      at
    com.intellij.openapi.actionSystem.DefaultActionGroup.getChildren(DefaultActionGroup.java:305)
      at
    com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:188)
      at
    com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:153)
      at
    com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:228)
      at
    com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:153)
      at
    com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:228)
      at
    com.intellij.openapi.actionSystem.impl.Utils.fillMenu(Utils.java:365)
      at
    com.intellij.openapi.actionSystem.impl.ActionMenu.fillMenu(ActionMenu.java:315)
      at
    com.intellij.openapi.actionSystem.impl.ActionMenu.access$600(ActionMenu.java:41)
      at
    com.intellij.openapi.actionSystem.impl.ActionMenu$MenuListenerImpl.menuSelected(ActionMenu.java:271)
      at javax.swing.JMenu.fireMenuSelected(JMenu.java:1038)  at
    javax.swing.JMenu$MenuChangeListener.stateChanged(JMenu.java:1118)    at
    javax.swing.DefaultButtonModel.fireStateChanged(DefaultButtonModel.java:349)
      at
    javax.swing.DefaultButtonModel.setSelected(DefaultButtonModel.java:232)
      at javax.swing.JMenu.setSelected(JMenu.java:305)    at
    javax.swing.JMenu.menuSelectionChanged(JMenu.java:1187)   at
    com.intellij.openapi.actionSystem.impl.ActionMenu.menuSelectionChanged(ActionMenu.java:235)
      at
    javax.swing.MenuSelectionManager.setSelectedPath(MenuSelectionManager.java:125)
      at
    javax.swing.plaf.basic.BasicMenuUI$Handler.mouseEntered(BasicMenuUI.java:526)
      at java.awt.Component.processMouseEvent(Component.java:6557)    at
    javax.swing.JComponent.processMouseEvent(JComponent.java:3325)    at
    java.awt.Component.processEvent(Component.java:6313)  at
    java.awt.Container.processEvent(Container.java:2237)  at
    java.awt.Component.dispatchEventImpl(Component.java:4903)     at
    java.awt.Container.dispatchEventImpl(Container.java:2295)     at
    java.awt.Component.dispatchEvent(Component.java:4725)     at
    java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889)
      at
    java.awt.LightweightDispatcher.retargetMouseEnterExit(Container.java:4677)
      at
    java.awt.LightweightDispatcher.trackMouseEnterExit(Container.java:4655)
      at
    java.awt.LightweightDispatcher.processMouseEvent(Container.java:4506)
      at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467)
      at java.awt.Container.dispatchEventImpl(Container.java:2281)    at
    java.awt.Window.dispatchEventImpl(Window.java:2746)   at
    java.awt.Component.dispatchEvent(Component.java:4725)     at
    java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)    at
    java.awt.EventQueue.access$500(EventQueue.java:98)    at
    java.awt.EventQueue$3.run(EventQueue.java:715)    at
    java.awt.EventQueue$3.run(EventQueue.java:709)    at
    java.security.AccessController.doPrivileged(Native Method)    at
    java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
      at
    java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
      at java.awt.EventQueue$4.run(EventQueue.java:737)   at
    java.awt.EventQueue$4.run(EventQueue.java:735)    at
    java.security.AccessController.doPrivileged(Native Method)    at
    java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)   at
    com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:822)
      at
    com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:759)
      at
    com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:423)
      at
    java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
      at
    java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
      at
    java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
      at
    java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      at
    java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
    Caused by: java.lang.NoClassDefFoundError:
    com/sixrr/metrics/MetricsResultsHolder    at
    java.lang.Class.forName0(Native Method)   at
    java.lang.Class.forName(Class.java:348)   at
    com.intellij.openapi.actionSystem.impl.ActionManagerImpl.convertStub(ActionManagerImpl.java:144)
      ... 58 more Caused by: java.lang.ClassNotFoundException:
    com.sixrr.metrics.MetricsResultsHolder
    PluginClassLoader[MetricsReloaded, 1.8]
    com.intellij.ide.plugins.cl.PluginClassLoader@76fcea6b    at
    com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:63)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)    ... 61 more</p>
  </blockquote>