java.lang.NoClassDefFoundError: com/tinder/scarlet/messageadapter/builtin/BuiltInMessageAdapterFactory #237
Description
I'm using version 0.2.5-SNAPSHOT and also added the required maven repository but I keep getting this error .
scarlet-okhttp = {group = "com.tinder.scarlet" , name = "protocol-websocket-okhttp" , version.ref = "scarlet"} scarlet-moshi = {group = "com.tinder.scarlet" , name = "message-adapter-moshi" , version.ref = "scarlet"} scarlet-coroutines = {group = "com.tinder.scarlet" , name = "stream-adapter-coroutines" , version.ref = "scarlet"} scarlet-lifecycle = {group = "com.tinder.scarlet" , name = "lifecycle-android" , version.ref = "scarlet"} okhttp3 = {group = "com.squareup.okhttp3" , name = "okhttp" , version.ref = "okhttp3"} okhttp-logging = {group = "com.squareup.okhttp3" , name = "logging-interceptor" , version.ref = "okhttp3"} moshi = {group = "com.squareup.moshi" , name = "moshi-kotlin" , version.ref = "moshi"}
`val loggingInterceptor = HttpLoggingInterceptor()
val interceptor = loggingInterceptor.apply {
loggingInterceptor.level = HttpLoggingInterceptor.Level.BODY
}
val httpClient: OkHttpClient = OkHttpClient.Builder()
.readTimeout(2000 , TimeUnit.MILLISECONDS)
.writeTimeout(2000, TimeUnit.MILLISECONDS)
.followRedirects(false)
.connectTimeout(3000 , TimeUnit.MILLISECONDS)
.addInterceptor(interceptor)
.build()
val scarlet = Scarlet(
OkHttpWebSocket (
httpClient,
OkHttpWebSocket.SimpleRequestFactory(
{ Request.Builder().url("").build()},
{ ShutdownReason.GRACEFUL }
)
),
Scarlet.Configuration (
backoffStrategy = LinearBackoffStrategy(3000),
messageAdapterFactories = listOf(MoshiMessageAdapter.Factory()),
streamAdapterFactories = listOf(CoroutinesStreamAdapterFactory()),
)
)
val bitService = scarlet.create(BitService::class.java)
bitService.authenticateUser(
RequestDataFrame(
messageType = 0,
sequenceNumber = 0,
functionName = "AuthenticateUser",
payloadRequest = "{UserName: , Password: }"
)
)`