Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClassCastException on Device Selection screen (Android 2.2) #12

Open
danielesegato opened this issue Sep 1, 2016 · 4 comments
Open

Comments

@danielesegato
Copy link

danielesegato commented Sep 1, 2016

I get this error:
java.lang.ClassCastException: com.android.tools.idea.run.ConnectedAndroidDevice cannot be cast to com.android.ddmlib.IDevice

When I have both a device on USB and an emulator open and I try to connect on Wifi I get the above error (ClassCastException).
If I close the emulator the select device screen is skipped and the device is correctly attached.

Android Studio 2.2 Beta 3
Build #AI-145.3225885, built on August 26, 2016
JRE: 1.8.0_76-release-b03 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

This is the full stacktrace:

ava.lang.ClassCastException: com.android.tools.idea.run.ConnectedAndroidDevice cannot be cast to com.android.ddmlib.IDevice
java.lang.RuntimeException: java.lang.ClassCastException: com.android.tools.idea.run.ConnectedAndroidDevice cannot be cast to com.android.ddmlib.IDevice
    at com.developerphil.adbidea.compatibility.BackwardCompatibleGetter.get(BackwardCompatibleGetter.java:19)
    at com.developerphil.adbidea.ui.MyDeviceChooser$MyDeviceTableModel.getValueAt(MyDeviceChooser.java:422)
    at javax.swing.JTable.getValueAt(JTable.java:2717)
    at com.intellij.ui.table.JBTable.calculateRowHeight(JBTable.java:178)
    at com.intellij.ui.table.JBTable.getRowHeight(JBTable.java:157)
    at javax.swing.JTable.getRowHeight(JTable.java:992)
    at javax.swing.JTable.getCellRect(JTable.java:2937)
    at javax.swing.JTable.valueChanged(JTable.java:4698)
    at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:184)
    at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:164)
    at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:211)
    at javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:405)
    at javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:415)
    at javax.swing.DefaultListSelectionModel.setSelectionInterval(DefaultListSelectionModel.java:459)
    at com.developerphil.adbidea.ui.MyDeviceChooser.refreshTable(MyDeviceChooser.java:296)
    at com.developerphil.adbidea.ui.MyDeviceChooser.access$600(MyDeviceChooser.java:68)
    at com.developerphil.adbidea.ui.MyDeviceChooser$6.run(MyDeviceChooser.java:275)
    at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:345)
    at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:329)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:857)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:658)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:386)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
    at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
    at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
    at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
    at java.awt.Dialog.show(Dialog.java:1084)
    at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:792)
    at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:465)
    at com.intellij.openapi.ui.DialogWrapper.invokeShow(DialogWrapper.java:1661)
    at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1610)
    at com.layernet.adbwifi.AdbWifiConnect.askUserForDevice(AdbWifiConnect.java:100)
    at com.layernet.adbwifi.AdbWifiConnect.getDevice(AdbWifiConnect.java:74)
    at com.layernet.adbwifi.AdbWifiConnect.executeOnDevice(AdbWifiConnect.java:31)
    at com.layernet.adbwifi.AdbWifiConnect.adbWifi(AdbWifiConnect.java:27)
    at com.layernet.adbwifi.AdbWifiAction.actionPerformed(AdbWifiAction.java:9)
    at com.layernet.adbwifi.AdbAction.actionPerformed(AdbAction.java:13)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:191)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter$1.run(ActionMenuItem.java:312)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:958)
    at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:124)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:282)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:110)
    at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:513)
    at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:45)
    at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:533)
    at java.awt.Component.processMouseEvent(Component.java:6533)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
    at java.awt.Component.processEvent(Component.java:6298)
    at java.awt.Container.processEvent(Container.java:2236)
    at java.awt.Component.dispatchEventImpl(Component.java:4889)
    at java.awt.Container.dispatchEventImpl(Container.java:2294)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
    at java.awt.Container.dispatchEventImpl(Container.java:2280)
    at java.awt.Window.dispatchEventImpl(Window.java:2746)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.awt.EventQueue$4.run(EventQueue.java:731)
    at java.awt.EventQueue$4.run(EventQueue.java:729)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:857)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:654)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:386)
    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.ClassCastException: com.android.tools.idea.run.ConnectedAndroidDevice cannot be cast to com.android.ddmlib.IDevice
    at com.developerphil.adbidea.compatibility.CanRunOnDeviceCompat.getCurrentImplementation(CanRunOnDeviceCompat.java:29)
    at com.developerphil.adbidea.compatibility.CanRunOnDeviceCompat.getCurrentImplementation(CanRunOnDeviceCompat.java:12)
    at com.developerphil.adbidea.compatibility.BackwardCompatibleGetter.get(BackwardCompatibleGetter.java:12)
    ... 92 more



java.lang.RuntimeException: java.lang.ClassCastException: com.android.tools.idea.run.ConnectedAndroidDevice cannot be cast to com.android.ddmlib.IDevice
    at com.developerphil.adbidea.compatibility.BackwardCompatibleGetter.get(BackwardCompatibleGetter.java:19)
    at com.developerphil.adbidea.ui.MyDeviceChooser$MyDeviceTableModel.getValueAt(MyDeviceChooser.java:422)
    at javax.swing.JTable.getValueAt(JTable.java:2717)
    at com.intellij.ui.table.JBTable.calculateRowHeight(JBTable.java:178)
    at com.intellij.ui.table.JBTable.getRowHeight(JBTable.java:157)
    at javax.swing.JTable.rowAtPoint(JTable.java:2869)
    at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1781)
    at javax.swing.plaf.ComponentUI.update(ComponentUI.java:161)
    at javax.swing.JComponent.paintComponent(JComponent.java:780)
    at com.intellij.ui.table.JBTable.paintComponent(JBTable.java:301)
    at javax.swing.JComponent.paint(JComponent.java:1056)
    at com.intellij.ui.table.JBTable.paint(JBTable.java:395)
    at javax.swing.JComponent.paintChildren(JComponent.java:889)
    at javax.swing.JComponent.paint(JComponent.java:1065)
    at javax.swing.JViewport.paint(JViewport.java:728)
    at com.intellij.ui.components.JBViewport.paint(JBViewport.java:165)
    at javax.swing.JComponent.paintChildren(JComponent.java:889)
    at javax.swing.JComponent.paint(JComponent.java:1065)
    at javax.swing.JComponent.paintToOffscreen(JComponent.java:5210)
    at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1579)
    at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1502)
    at javax.swing.RepaintManager.paint(RepaintManager.java:1272)
    at javax.swing.JComponent._paintImmediately(JComponent.java:5158)
    at javax.swing.JComponent.paintImmediately(JComponent.java:4969)
    at javax.swing.RepaintManager$4.run(RepaintManager.java:831)
    at javax.swing.RepaintManager$4.run(RepaintManager.java:814)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:814)
    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:789)
    at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:738)
    at javax.swing.RepaintManager.access$1200(RepaintManager.java:64)
    at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1732)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:857)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:658)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:386)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
    at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
    at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
    at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
    at java.awt.Dialog.show(Dialog.java:1084)
    at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:792)
    at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:465)
    at com.intellij.openapi.ui.DialogWrapper.invokeShow(DialogWrapper.java:1661)
    at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1610)
    at com.layernet.adbwifi.AdbWifiConnect.askUserForDevice(AdbWifiConnect.java:100)
    at com.layernet.adbwifi.AdbWifiConnect.getDevice(AdbWifiConnect.java:74)
    at com.layernet.adbwifi.AdbWifiConnect.executeOnDevice(AdbWifiConnect.java:31)
    at com.layernet.adbwifi.AdbWifiConnect.adbWifi(AdbWifiConnect.java:27)
    at com.layernet.adbwifi.AdbWifiAction.actionPerformed(AdbWifiAction.java:9)
    at com.layernet.adbwifi.AdbAction.actionPerformed(AdbAction.java:13)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:191)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter$1.run(ActionMenuItem.java:312)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:958)
    at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:124)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:282)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:110)
    at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:513)
    at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:45)
    at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:533)
    at java.awt.Component.processMouseEvent(Component.java:6533)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
    at java.awt.Component.processEvent(Component.java:6298)
    at java.awt.Container.processEvent(Container.java:2236)
    at java.awt.Component.dispatchEventImpl(Component.java:4889)
    at java.awt.Container.dispatchEventImpl(Container.java:2294)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
    at java.awt.Container.dispatchEventImpl(Container.java:2280)
    at java.awt.Window.dispatchEventImpl(Window.java:2746)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.awt.EventQueue$4.run(EventQueue.java:731)
    at java.awt.EventQueue$4.run(EventQueue.java:729)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:857)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:654)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:386)
    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.ClassCastException: com.android.tools.idea.run.ConnectedAndroidDevice cannot be cast to com.android.ddmlib.IDevice
    at com.developerphil.adbidea.compatibility.CanRunOnDeviceCompat.getCurrentImplementation(CanRunOnDeviceCompat.java:29)
    at com.developerphil.adbidea.compatibility.CanRunOnDeviceCompat.getCurrentImplementation(CanRunOnDeviceCompat.java:12)
    at com.developerphil.adbidea.compatibility.BackwardCompatibleGetter.get(BackwardCompatibleGetter.java:12)
    ... 106 more



java.lang.RuntimeException: java.lang.ClassCastException: com.android.tools.idea.run.ConnectedAndroidDevice cannot be cast to com.android.ddmlib.IDevice
    at com.developerphil.adbidea.compatibility.BackwardCompatibleGetter.get(BackwardCompatibleGetter.java:19)
    at com.developerphil.adbidea.ui.MyDeviceChooser$MyDeviceTableModel.getValueAt(MyDeviceChooser.java:422)
    at javax.swing.JTable.getValueAt(JTable.java:2717)
    at com.intellij.ui.table.JBTable.calculateRowHeight(JBTable.java:178)
    at com.intellij.ui.table.JBTable.getRowHeight(JBTable.java:157)
    at javax.swing.JTable.rowAtPoint(JTable.java:2869)
    at javax.swing.JTable.getToolTipText(JTable.java:3387)
    at com.intellij.ide.IdeTooltipManager.maybeShowFor(IdeTooltipManager.java:175)
    at com.intellij.ide.IdeTooltipManager.eventDispatched(IdeTooltipManager.java:124)
    at java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched(Toolkit.java:2425)
    at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2316)
    at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2316)
    at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2316)
    at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2316)
    at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2316)
    at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2316)
    at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2316)
    at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2316)
    at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2316)
    at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2316)
    at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2316)
    at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2316)
    at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2316)
    at java.awt.Toolkit.notifyAWTEventListeners(Toolkit.java:2275)
    at java.awt.Component.dispatchEventImpl(Component.java:4785)
    at java.awt.Container.dispatchEventImpl(Container.java:2294)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
    at java.awt.LightweightDispatcher.retargetMouseEnterExit(Container.java:4676)
    at java.awt.LightweightDispatcher.trackMouseEnterExit(Container.java:4654)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4505)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
    at java.awt.Container.dispatchEventImpl(Container.java:2280)
    at java.awt.Window.dispatchEventImpl(Window.java:2746)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.awt.EventQueue$4.run(EventQueue.java:731)
    at java.awt.EventQueue$4.run(EventQueue.java:729)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:857)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:654)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:386)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
    at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
    at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
    at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
    at java.awt.Dialog.show(Dialog.java:1084)
    at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:792)
    at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:465)
    at com.intellij.openapi.ui.DialogWrapper.invokeShow(DialogWrapper.java:1661)
    at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1610)
    at com.layernet.adbwifi.AdbWifiConnect.askUserForDevice(AdbWifiConnect.java:100)
    at com.layernet.adbwifi.AdbWifiConnect.getDevice(AdbWifiConnect.java:74)
    at com.layernet.adbwifi.AdbWifiConnect.executeOnDevice(AdbWifiConnect.java:31)
    at com.layernet.adbwifi.AdbWifiConnect.adbWifi(AdbWifiConnect.java:27)
    at com.layernet.adbwifi.AdbWifiAction.actionPerformed(AdbWifiAction.java:9)
    at com.layernet.adbwifi.AdbAction.actionPerformed(AdbAction.java:13)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:191)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter$1.run(ActionMenuItem.java:312)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:958)
    at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:124)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:282)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:110)
    at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:513)
    at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:45)
    at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:533)
    at java.awt.Component.processMouseEvent(Component.java:6533)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
    at java.awt.Component.processEvent(Component.java:6298)
    at java.awt.Container.processEvent(Container.java:2236)
    at java.awt.Component.dispatchEventImpl(Component.java:4889)
    at java.awt.Container.dispatchEventImpl(Container.java:2294)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
    at java.awt.Container.dispatchEventImpl(Container.java:2280)
    at java.awt.Window.dispatchEventImpl(Window.java:2746)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.awt.EventQueue$4.run(EventQueue.java:731)
    at java.awt.EventQueue$4.run(EventQueue.java:729)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:857)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:654)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:386)
    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.ClassCastException: com.android.tools.idea.run.ConnectedAndroidDevice cannot be cast to com.android.ddmlib.IDevice
    at com.developerphil.adbidea.compatibility.CanRunOnDeviceCompat.getCurrentImplementation(CanRunOnDeviceCompat.java:29)
    at com.developerphil.adbidea.compatibility.CanRunOnDeviceCompat.getCurrentImplementation(CanRunOnDeviceCompat.java:12)
    at com.developerphil.adbidea.compatibility.BackwardCompatibleGetter.get(BackwardCompatibleGetter.java:12)
    ... 112 more



java.lang.RuntimeException: java.lang.ClassCastException: com.android.tools.idea.run.ConnectedAndroidDevice cannot be cast to com.android.ddmlib.IDevice
    at com.developerphil.adbidea.compatibility.BackwardCompatibleGetter.get(BackwardCompatibleGetter.java:19)
    at com.developerphil.adbidea.ui.MyDeviceChooser$MyDeviceTableModel.getValueAt(MyDeviceChooser.java:422)
    at javax.swing.JTable.getValueAt(JTable.java:2717)
    at com.intellij.ui.table.JBTable.calculateRowHeight(JBTable.java:178)
    at com.intellij.ui.table.JBTable.getRowHeight(JBTable.java:157)
    at javax.swing.JTable.rowAtPoint(JTable.java:2869)
    at javax.swing.JTable.getToolTipText(JTable.java:3387)
    at com.intellij.ide.IdeTooltipManager.maybeShowFor(IdeTooltipManager.java:175)
    at com.intellij.ide.IdeTooltipManager.eventDispatched(IdeTooltipManager.java:124)
    at java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched(Toolkit.java:2425)
    at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2316)
    at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2316)
    at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2316)
    at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2316)
    at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2316)
    at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2316)
    at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2316)
    at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2316)
    at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2316)
    at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2316)
    at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2316)
    at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2316)
    at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2316)
    at java.awt.Toolkit.notifyAWTEventListeners(Toolkit.java:2275)
    at java.awt.Component.dispatchEventImpl(Component.java:4785)
    at java.awt.Container.dispatchEventImpl(Container.java:2294)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
    at java.awt.LightweightDispatcher.retargetMouseEnterExit(Container.java:4676)
    at java.awt.LightweightDispatcher.trackMouseEnterExit(Container.java:4654)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4505)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
    at java.awt.Container.dispatchEventImpl(Container.java:2280)
    at java.awt.Window.dispatchEventImpl(Window.java:2746)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.awt.EventQueue$4.run(EventQueue.java:731)
    at java.awt.EventQueue$4.run(EventQueue.java:729)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:857)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:654)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:386)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
    at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
    at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
    at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
    at java.awt.Dialog.show(Dialog.java:1084)
    at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:792)
    at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:465)
    at com.intellij.openapi.ui.DialogWrapper.invokeShow(DialogWrapper.java:1661)
    at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1610)
    at com.layernet.adbwifi.AdbWifiConnect.askUserForDevice(AdbWifiConnect.java:100)
    at com.layernet.adbwifi.AdbWifiConnect.getDevice(AdbWifiConnect.java:74)
    at com.layernet.adbwifi.AdbWifiConnect.executeOnDevice(AdbWifiConnect.java:31)
    at com.layernet.adbwifi.AdbWifiConnect.adbWifi(AdbWifiConnect.java:27)
    at com.layernet.adbwifi.AdbWifiAction.actionPerformed(AdbWifiAction.java:9)
    at com.layernet.adbwifi.AdbAction.actionPerformed(AdbAction.java:13)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:191)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter$1.run(ActionMenuItem.java:312)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:958)
    at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:124)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:282)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:110)
    at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:513)
    at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:45)
    at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:533)
    at java.awt.Component.processMouseEvent(Component.java:6533)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
    at java.awt.Component.processEvent(Component.java:6298)
    at java.awt.Container.processEvent(Container.java:2236)
    at java.awt.Component.dispatchEventImpl(Component.java:4889)
    at java.awt.Container.dispatchEventImpl(Container.java:2294)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
    at java.awt.Container.dispatchEventImpl(Container.java:2280)
    at java.awt.Window.dispatchEventImpl(Window.java:2746)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.awt.EventQueue$4.run(EventQueue.java:731)
    at java.awt.EventQueue$4.run(EventQueue.java:729)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:857)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:654)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:386)
    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.ClassCastException: com.android.tools.idea.run.ConnectedAndroidDevice cannot be cast to com.android.ddmlib.IDevice
    at com.developerphil.adbidea.compatibility.CanRunOnDeviceCompat.getCurrentImplementation(CanRunOnDeviceCompat.java:29)
    at com.developerphil.adbidea.compatibility.CanRunOnDeviceCompat.getCurrentImplementation(CanRunOnDeviceCompat.java:12)
    at com.developerphil.adbidea.compatibility.BackwardCompatibleGetter.get(BackwardCompatibleGetter.java:12)
    ... 112 more
@VivekNeel
Copy link

any update on this? I'm getting the same error

@SUPERCILEX
Copy link

I'm getting the same issue:

java.lang.ClassCastException: com.android.tools.idea.run.ConnectedAndroidDevice cannot be cast to com.android.ddmlib.IDevice
java.lang.RuntimeException: java.lang.ClassCastException: com.android.tools.idea.run.ConnectedAndroidDevice cannot be cast to com.android.ddmlib.IDevice
	at com.developerphil.adbidea.compatibility.BackwardCompatibleGetter.get(BackwardCompatibleGetter.java:19)
	at com.developerphil.adbidea.ui.MyDeviceChooser$MyDeviceTableModel.getValueAt(MyDeviceChooser.java:422)
	at javax.swing.JTable.getValueAt(JTable.java:2717)
	at com.intellij.ui.table.JBTable.calculateRowHeight(JBTable.java:162)
	at com.intellij.ui.table.JBTable.getRowHeight(JBTable.java:141)
	at javax.swing.JTable.getRowHeight(JTable.java:992)
	at javax.swing.JTable.getCellRect(JTable.java:2937)
	at javax.swing.JTable.valueChanged(JTable.java:4698)
	at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:184)
	at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:164)
	at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:211)
	at javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:405)
	at javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:415)
	at javax.swing.DefaultListSelectionModel.setSelectionInterval(DefaultListSelectionModel.java:459)
	at com.developerphil.adbidea.ui.MyDeviceChooser.refreshTable(MyDeviceChooser.java:296)
	at com.developerphil.adbidea.ui.MyDeviceChooser.access$600(MyDeviceChooser.java:68)
	at com.developerphil.adbidea.ui.MyDeviceChooser$6.run(MyDeviceChooser.java:275)
	at com.intellij.openapi.application.TransactionGuardImpl$6.run(TransactionGuardImpl.java:315)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.a(LaterInvocator.java:410)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:399)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
	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.awt.EventQueue.dispatchEvent(EventQueue.java:732)
	at com.intellij.ide.IdeEventQueue.k(IdeEventQueue.java:827)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:655)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
	at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
	at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
	at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
	at java.awt.Dialog.show(Dialog.java:1084)
	at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:735)
	at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:457)
	at com.intellij.openapi.ui.DialogWrapper.invokeShow(DialogWrapper.java:1688)
	at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1637)
	at com.layernet.adbwifi.AdbWifiConnect.askUserForDevice(AdbWifiConnect.java:100)
	at com.layernet.adbwifi.AdbWifiConnect.getDevice(AdbWifiConnect.java:74)
	at com.layernet.adbwifi.AdbWifiConnect.executeOnDevice(AdbWifiConnect.java:31)
	at com.layernet.adbwifi.AdbWifiConnect.adbWifi(AdbWifiConnect.java:27)
	at com.layernet.adbwifi.AdbWifiAction.actionPerformed(AdbWifiAction.java:9)
	at com.layernet.adbwifi.AdbAction.actionPerformed(AdbAction.java:13)
	at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:208)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:224)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:570)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.a(IdeKeyEventDispatcher.java:619)
	at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:202)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:618)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.d(IdeKeyEventDispatcher.java:477)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:211)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:633)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365)
	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.ClassCastException: com.android.tools.idea.run.ConnectedAndroidDevice cannot be cast to com.android.ddmlib.IDevice
	at com.developerphil.adbidea.compatibility.CanRunOnDeviceCompat.getCurrentImplementation(CanRunOnDeviceCompat.java:29)
	at com.developerphil.adbidea.compatibility.CanRunOnDeviceCompat.getCurrentImplementation(CanRunOnDeviceCompat.java:12)
	at com.developerphil.adbidea.compatibility.BackwardCompatibleGetter.get(BackwardCompatibleGetter.java:12)
	... 65 more


java.lang.RuntimeException: java.lang.ClassCastException: com.android.tools.idea.run.ConnectedAndroidDevice cannot be cast to com.android.ddmlib.IDevice
	at com.developerphil.adbidea.compatibility.BackwardCompatibleGetter.get(BackwardCompatibleGetter.java:19)
	at com.developerphil.adbidea.ui.MyDeviceChooser$MyDeviceTableModel.getValueAt(MyDeviceChooser.java:422)
	at javax.swing.JTable.getValueAt(JTable.java:2717)
	at com.intellij.ui.table.JBTable.calculateRowHeight(JBTable.java:162)
	at com.intellij.ui.table.JBTable.getRowHeight(JBTable.java:141)
	at javax.swing.JTable.rowAtPoint(JTable.java:2869)
	at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1781)
	at javax.swing.plaf.ComponentUI.update(ComponentUI.java:161)
	at javax.swing.JComponent.paintComponent(JComponent.java:780)
	at com.intellij.ui.table.JBTable.paintComponent(JBTable.java:263)
	at javax.swing.JComponent.paint(JComponent.java:1056)
	at com.intellij.ui.table.JBTable.paint(JBTable.java:362)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JViewport.paint(JViewport.java:728)
	at com.intellij.ui.components.JBViewport.paint(JBViewport.java:285)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintToOffscreen(JComponent.java:5210)
	at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1579)
	at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1502)
	at javax.swing.RepaintManager.paint(RepaintManager.java:1272)
	at javax.swing.JComponent._paintImmediately(JComponent.java:5158)
	at javax.swing.JComponent.paintImmediately(JComponent.java:4969)
	at javax.swing.RepaintManager$4.run(RepaintManager.java:831)
	at javax.swing.RepaintManager$4.run(RepaintManager.java:814)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:814)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:789)
	at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:738)
	at javax.swing.RepaintManager.access$1200(RepaintManager.java:64)
	at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1732)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
	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.awt.EventQueue.dispatchEvent(EventQueue.java:732)
	at com.intellij.ide.IdeEventQueue.k(IdeEventQueue.java:827)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:655)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
	at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
	at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
	at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
	at java.awt.Dialog.show(Dialog.java:1084)
	at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:735)
	at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:457)
	at com.intellij.openapi.ui.DialogWrapper.invokeShow(DialogWrapper.java:1688)
	at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1637)
	at com.layernet.adbwifi.AdbWifiConnect.askUserForDevice(AdbWifiConnect.java:100)
	at com.layernet.adbwifi.AdbWifiConnect.getDevice(AdbWifiConnect.java:74)
	at com.layernet.adbwifi.AdbWifiConnect.executeOnDevice(AdbWifiConnect.java:31)
	at com.layernet.adbwifi.AdbWifiConnect.adbWifi(AdbWifiConnect.java:27)
	at com.layernet.adbwifi.AdbWifiAction.actionPerformed(AdbWifiAction.java:9)
	at com.layernet.adbwifi.AdbAction.actionPerformed(AdbAction.java:13)
	at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:208)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:224)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:570)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.a(IdeKeyEventDispatcher.java:619)
	at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:202)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:618)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.d(IdeKeyEventDispatcher.java:477)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:211)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:633)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365)
	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.ClassCastException: com.android.tools.idea.run.ConnectedAndroidDevice cannot be cast to com.android.ddmlib.IDevice
	at com.developerphil.adbidea.compatibility.CanRunOnDeviceCompat.getCurrentImplementation(CanRunOnDeviceCompat.java:29)
	at com.developerphil.adbidea.compatibility.CanRunOnDeviceCompat.getCurrentImplementation(CanRunOnDeviceCompat.java:12)
	at com.developerphil.adbidea.compatibility.BackwardCompatibleGetter.get(BackwardCompatibleGetter.java:12)
	... 78 more

@cloudshooterhuman
Copy link

Same here

@yumna11
Copy link

yumna11 commented Aug 20, 2017

same here, please suggest answer for it, resolve it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants