From 914d26b8440cbe944b15c402a5d8b64983d95827 Mon Sep 17 00:00:00 2001 From: Scott McKenzie Date: Tue, 30 Oct 2018 10:53:40 -0600 Subject: [PATCH] NoClassDefFoundError fix On pre API 24 devices, it crashes with NoClassDefFoundError --- src/main/kotlin/org/phoenixframework/PhxSocket.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/org/phoenixframework/PhxSocket.kt b/src/main/kotlin/org/phoenixframework/PhxSocket.kt index 9582408..b666e74 100644 --- a/src/main/kotlin/org/phoenixframework/PhxSocket.kt +++ b/src/main/kotlin/org/phoenixframework/PhxSocket.kt @@ -120,7 +120,7 @@ open class PhxSocket( // If there are query params, append them now params?.let { val httpBuilder = httpUrl.newBuilder() - it.forEach { key, value -> + it.forEach { (key, value) -> httpBuilder.addQueryParameter(key, value.toString()) } @@ -442,4 +442,4 @@ open class PhxSocket( override fun onFailure(webSocket: WebSocket?, t: Throwable, response: Response?) { this.onConnectionError(t, response) } -} \ No newline at end of file +}