pbreault / adb-idea

A plugin for Android Studio and Intellij IDEA that speeds up your day to day android development.
Apache License 2.0
2.1k stars 256 forks source link

IncompatibleClassChangeError com.android.ddmlib.Client #125

Closed linean closed 1 year ago

linean commented 4 years ago

Hello, first I would like to thank you for this amazing plugin. I can't imagine working without it.

Recently I've discovered that ADB Restart App With Debugger is not working properly. Each time I use it device gets stuck in Waiting for debugger mode and there is crash happening in the Android Studio background:

java.lang.IncompatibleClassChangeError: Found class com.android.ddmlib.Client, but interface was expected
    at com.developerphil.adbidea.debugger.Debugger.terminateRunSessions(Debugger.kt:34)
    at com.developerphil.adbidea.debugger.Debugger.closeOldSessionAndRun(Debugger.kt:28)
    at com.developerphil.adbidea.debugger.Debugger.access$closeOldSessionAndRun(Debugger.kt:13)
    at com.developerphil.adbidea.debugger.Debugger$attach$2.invoke(Debugger.kt:19)
    at com.developerphil.adbidea.debugger.Debugger$attach$2.invoke(Debugger.kt:13)
    at com.developerphil.adbidea.HelperMethodsKt$sam$java_lang_Runnable$0.run(HelperMethods.kt)
    at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:312)
    at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(LaterInvocator.java:433)
    at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:416)
    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: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:74)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:878)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:827)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:466)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:704)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:465)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
    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)

My setup: Android Studio 3.6.3 (as a snap package) Ubuntu 20.04 ADB Idea 1.6.0

pbreault commented 4 years ago

Thanks for the report! I was able to reproduce the bug. I'll push a fix shortly.

pbreault commented 4 years ago

Fixed in 1.6.1

linean commented 4 years ago

adb_idea_1 6 1

Unfortunately it's still the same for me :disappointed:

pbreault commented 4 years ago

Oh, that's annoying! I was hoping that it wouldn't be a platform specific bug.

What JDK is studio running on?

linean commented 4 years ago

image