AbstractMethodError exception thrown when executing adb command
Closed this issue · 5 comments
Describe the bug
Exception is thrown when trying to execute simple adb command:
09:04:47.440 [vert.x-eventloop-thread-1] ERROR io.vertx.core.impl.ContextImpl - Unhandled exception
java.lang.AbstractMethodError: Receiver class com.malinskiy.adam.transport.vertx.ChannelReadStream does not define or inherit an implementation of the resolved method 'abstract java.lang.Object trySend-JP2dKIU(java.lang.Object)' of interface kotlinx.coroutines.channels.SendChannel.
at kotlinx.coroutines.channels.ChannelsKt__ChannelsKt.sendBlocking(Channels.kt:53)
at kotlinx.coroutines.channels.ChannelsKt.sendBlocking(Unknown Source)
at com.malinskiy.adam.transport.vertx.ChannelReadStream$subscribe$3.handle(VertxSocket.kt:241)
at com.malinskiy.adam.transport.vertx.VariableSizeRecordParser.handleParsing(VariableSizeRecordParser.kt:94)
at com.malinskiy.adam.transport.vertx.VariableSizeRecordParser.request(VariableSizeRecordParser.kt:68)
at com.malinskiy.adam.transport.vertx.VertxSocket$readAvailable$2.handle(VertxSocket.kt:116)
at com.malinskiy.adam.transport.vertx.VertxSocket$readAvailable$2.handle(VertxSocket.kt:49)
at io.vertx.core.impl.AbstractContext.dispatch(AbstractContext.java:96)
at io.vertx.core.impl.AbstractContext.dispatch(AbstractContext.java:59)
at io.vertx.core.impl.EventLoopContext.lambda$runOnContext$0(EventLoopContext.java:40)
To Reproduce
private fun run(): Int = runBlocking {
StartAdbInteractor().execute()
val adb = AndroidDebugBridgeClientFactory().build()
adb.execute(GetAdbServerVersionRequest())
return@runBlocking 0
}
This looks like classpath issue. Can you verify that you’re using the expected version of dependencies including kotlin coroutines and vertx?
Yup, I think I do - from ./gradlew dependencies
:
...
+--- com.malinskiy:adam:0.2.5
+--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2
| \--- org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.2
| +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30 (*)
| \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.5.30
\--- io.vertx:vertx-core:4.1.5
...
Try updating to the latest Adam btw, 0.4.3 has been released 3 months ago and 0.2.5 is from 9 months ago
Oops, my bad, I just grabbed latest artifact from https://mvnrepository.com/artifact/com.malinskiy/adam without looking at dates/versions. Let me try newer versions now.
The coordinates changed due to additional features. I didn’t want to include everything in one jar here. Here is the latest https://search.maven.org/artifact/com.malinskiy.adam/adam/0.4.3/jar