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.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 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.