java.lang.RuntimeException: java.lang.ClassCastException: com.android.tools.idea.run.ConnectedAndroidDevice cannot be cast to com.android.ddmlib.IDevice

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via GitHub by SUPERCILEX
, 9 months ago
java.lang.ClassCastException: com.android.tools.idea.run.ConnectedAndroidDevice cannot be cast to com.android.ddmlib.IDevice
via GitHub by danielesegato
, 8 months ago
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.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)
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 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 javax.swing.JComponent.paint(JComponent.java:1056)
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 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 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 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)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Know the solutions? Share your knowledge to help other developers to debug faster.